524 {
526
527 if (
dAta.
tEts.find(getNumeredEntFiniteElementPtr()->getEnt()) ==
530 }
531
534 if (nb_row == 0)
536 if (nb_col == 0)
538
540 int nb_base_functions = row_data.
getN().size2();
541
542 {
543
544 k.resize(nb_row, nb_col);
546 jac.resize(3, nb_col);
547
548 for (
unsigned int gg = 0; gg < row_data.
getN().size1(); gg++) {
549
550 try {
552 } catch (const std::exception &ex) {
553 std::ostringstream ss;
554 ss << "throw in method: " << ex.what() << std::endl;
555 SETERRQ(PETSC_COMM_SELF, 1, ss.str().c_str());
556 }
557
560
561 {
562 int dd1 = 0;
563
564 for (; dd1 < nb_row / 3; dd1++) {
566 &
jac(0, 0), &
jac(0, 1), &
jac(0, 2), &
jac(1, 0), &
jac(1, 1),
568 for (int dd2 = 0; dd2 < nb_col / 3; dd2++) {
570 &
k(3 * dd1 + 0, 3 * dd2 + 0), &
k(3 * dd1 + 0, 3 * dd2 + 1),
571 &
k(3 * dd1 + 0, 3 * dd2 + 2), &
k(3 * dd1 + 1, 3 * dd2 + 0),
572 &
k(3 * dd1 + 1, 3 * dd2 + 1), &
k(3 * dd1 + 1, 3 * dd2 + 2),
573 &
k(3 * dd1 + 2, 3 * dd2 + 0), &
k(3 * dd1 + 2, 3 * dd2 + 1),
574 &
k(3 * dd1 + 2, 3 * dd2 + 2));
575 t_k(
i,
j) += base * t_jac(
i,
j);
576 ++t_jac;
577 }
578 ++base;
579
580
581
582
583
584 }
585 for (; dd1 != nb_base_functions; dd1++) {
586 ++base;
587 }
588 }
589 }
590
594 VectorDofs::iterator dit = dofs.begin();
595 for (int ii = 0; dit != dofs.end(); dit++, ii++) {
598 indices[ii] = -1;
599 }
600 }
603 } else {
607 }
608 }
610}
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
#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 dofs data stature FEDofEntity
const VectorInt & getIndices() const
Get global indices of dofs on entity.