115 {
117
118 const size_t nb_row_dofs = row_data.
getIndices().size();
119 const size_t nb_col_dofs = col_data.
getIndices().size();
120
121 if (nb_row_dofs && nb_col_dofs) {
122
123 const size_t nb_integration_pts = row_data.
getN().size1();
124 const size_t nb_row_base_funcs = row_data.
getN().size2();
126 auto t_w = getFTensor0IntegrationWeight();
127 auto t_coords = getFTensor1CoordsAtGaussPts();
128 for (size_t gg = 0; gg != nb_integration_pts; ++gg) {
129 double alpha = getMeasure() * t_w * (*cache).density;
130
132 omg(
i) = (*cache).Omega(
i,
j) * t_coords(
j);
133
134 size_t rr = 0;
135 for (; rr != nb_row_dofs / 3; ++rr) {
136
137 auto t_mat = getFTensor2FromArray<3, 3, 3>(locMat, 3 * rr);
138
140
141 for (size_t cc = 0; cc != nb_col_dofs / 3; ++cc) {
142 t_mat(
i,
k) -=
alpha * t_row_diff_base(
j) * omg(
j) *
144
145 ++t_col_diff_base;
146 ++t_mat;
147 }
148
149 ++t_row_diff_base;
150 }
151 for (; rr != nb_row_base_funcs; ++rr)
152 ++t_row_diff_base;
153
154 ++t_coords;
155 ++t_w;
156 }
157 }
158
160}
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
FTensor::Index< 'i', SPACE_DIM > i
FTensor::Index< 'l', 3 > l
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.