Integrate grad-grad operator.
276 {
278
279
280 const double vol = getMeasure();
281
282 auto t_w = getFTensor0IntegrationWeight();
283
285
286 auto t_normal = getFTensor1NormalsAtGaussPts();
287
288 auto get_t_vec = [&](const int rr) {
291
293
295 };
296
297
299
301 t_r(
i) = t_normal(
i);
303
306 t_P(
i,
j) = t_r(
i) * t_r(
j);
308
309 const double alpha = t_w * vol;
310
311 int rr = 0;
312 for (; rr !=
nbRows / 3; rr++) {
313 auto t_vec = get_t_vec(3 * rr);
315 const double a =
alpha *
g * t_row_base;
316
317 for (
int cc = 0; cc !=
nbCols; cc++) {
318 t_vec(
i) +=
a * (t_Q(
i,
m) * t_col_diff_base(
m));
319 ++t_vec;
320 ++t_col_diff_base;
321 }
322
323 ++t_row_base;
324 }
325
327 ++t_row_base;
328
329 ++t_w;
330 ++t_normal;
331 }
332
334 }
Tensor1< T, Tensor_Dim > normalize()
#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< 'j', 3 > j
FTensor::Index< 'i', 3 > i
FTensor::Index< 'm', 3 > m
FTensor::Tensor1< FTensor::PackPtr< double *, Tensor_Dim >, Tensor_Dim > getFTensor1DiffN(const FieldApproximationBase base)
Get derivatives of base functions.
FTensor::Tensor0< FTensor::PackPtr< double *, 1 > > getFTensor0N(const FieldApproximationBase base)
Get base function as Tensor0.
int nbRows
number of dofs on rows
int nbIntegrationPts
number of integration points
MatrixDouble locMat
local entity block matrix
int nbCols
number if dof on column
int nbRowBaseFunctions
number or row base functions