55 {
57
58 const size_t nb_dofs = data.
getIndices().size();
59
60 if (nb_dofs) {
61
62 const size_t nb_base_functions = data.
getN().size2();
63 if (3 * nb_base_functions < nb_dofs)
64 SETERRQ(
66 "Number of DOFs is larger than number of base functions on entity");
67
68 const size_t nb_gauss_pts = data.
getN().size1();
69
70 auto t_w = getFTensor0IntegrationWeight();
72 auto t_grad = getFTensor2FromMat<3, 3>(*(
commonDataPtr->mGradPtr));
73 auto t_coords = getFTensor1CoordsAtGaussPts();
74
75 for (size_t gg = 0; gg != nb_gauss_pts; ++gg) {
76
78 omg(
i) = (*cache).Omega(
i,
j) * t_coords(
j);
79
80 double alpha = getMeasure() * t_w * (*cache).density;
81 auto t_nf = getFTensor1FromArray<3, 3>(locF);
82
83 size_t bb = 0;
84 for (; bb != nb_dofs / 3; ++bb) {
85
87 t_diff_base(
k) * omg(
k);
88
89 ++t_diff_base;
90 ++t_nf;
91 }
92 for (; bb < nb_base_functions; ++bb)
93 ++t_diff_base;
94
95 ++t_coords;
96 ++t_grad;
97 ++t_w;
98 }
99 }
100
102}
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
@ MOFEM_DATA_INCONSISTENCY
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
FTensor::Index< 'i', SPACE_DIM > i
FTensor::Index< 'j', 3 > j
FTensor::Index< 'k', 3 > k
Tensor2_Expr< Kronecker_Delta< T >, T, Dim0, Dim1, i, j > kronecker_delta(const Index< i, Dim0 > &, const Index< j, Dim1 > &)
Rank 2.
FTensor::Tensor1< FTensor::PackPtr< double *, Tensor_Dim >, Tensor_Dim > getFTensor1DiffN(const FieldApproximationBase base)
Get derivatives of base functions.
MatrixDouble & getN(const FieldApproximationBase base)
get base functions this return matrix (nb. of rows is equal to nb. of Gauss pts, nb....
const VectorInt & getIndices() const
Get global indices of dofs on entity.