525 {
527
528 if (
dAta.
tEts.find(getNumeredEntFiniteElementPtr()->getEnt()) ==
531 }
532
535 if (nb_row == 0)
537 if (nb_col == 0)
539
541 int nb_base_functions = row_data.
getN().size2();
542
543 {
544
545 k.resize(nb_row, nb_col);
547 jac.resize(3, nb_col);
548
549 for (
unsigned int gg = 0; gg < row_data.
getN().size1(); gg++) {
550
551 try {
553 } catch (const std::exception &ex) {
554 std::ostringstream ss;
555 ss << "throw in method: " << ex.what() << std::endl;
557 ss.str().c_str());
558 }
559
562
563 {
564 int dd1 = 0;
565
566 for (; dd1 < nb_row / 3; dd1++) {
568 &
jac(0, 0), &
jac(0, 1), &
jac(0, 2), &
jac(1, 0), &
jac(1, 1),
570 for (int dd2 = 0; dd2 < nb_col / 3; dd2++) {
572 &
k(3 * dd1 + 0, 3 * dd2 + 0), &
k(3 * dd1 + 0, 3 * dd2 + 1),
573 &
k(3 * dd1 + 0, 3 * dd2 + 2), &
k(3 * dd1 + 1, 3 * dd2 + 0),
574 &
k(3 * dd1 + 1, 3 * dd2 + 1), &
k(3 * dd1 + 1, 3 * dd2 + 2),
575 &
k(3 * dd1 + 2, 3 * dd2 + 0), &
k(3 * dd1 + 2, 3 * dd2 + 1),
576 &
k(3 * dd1 + 2, 3 * dd2 + 2));
577 t_k(
i,
j) += base * t_jac(
i,
j);
578 ++t_jac;
579 }
580 ++base;
581
582
583
584
585
586 }
587 for (; dd1 != nb_base_functions; dd1++) {
588 ++base;
589 }
590 }
591 }
592
596 VectorDofs::iterator dit = dofs.begin();
597 for (int ii = 0; dit != dofs.end(); dit++, ii++) {
600 indices[ii] = -1;
601 }
602 }
605 } else {
609 }
610 }
612}
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
@ MOFEM_DATA_INCONSISTENCY
#define CHKERR
Inline error check.
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
FTensor::Index< 'i', SPACE_DIM > i
FTensor::Index< 'j', 3 > j
UBlasVector< int > VectorInt
MoFEMErrorCode MatSetValues(Mat M, const EntitiesFieldData::EntData &row_data, const EntitiesFieldData::EntData &col_data, const double *ptr, InsertMode iora)
Assemble PETSc matrix.
ublas::vector< FEDofEntity *, DofsAllocator > VectorDofs
Range tEts
elements in block set
virtual MoFEMErrorCode getJac(EntitiesFieldData::EntData &col_data, int gg)
FTensor::Tensor0< FTensor::PackPtr< double *, 1 > > getFTensor0N(const FieldApproximationBase base)
Get base function as Tensor0.
MatrixDouble & getN(const FieldApproximationBase base)
get base functions this return matrix (nb. of rows is equal to nb. of Gauss pts, nb....
const VectorDofs & getFieldDofs() const
Get DOF data structures (const version)
const VectorInt & getIndices() const
Get global indices of degrees of freedom on entity.