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) {
290 &locMat(rr + 0, 0),
291
292 &locMat(rr + 1, 0),
293
294 &locMat(rr + 2, 0)};
295 };
296
297
298 for (int gg = 0; gg != nbIntegrationPts; gg++) {
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
326 for (; rr < nbRowBaseFunctions; ++rr)
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.