Integrate grad-grad operator.
1436 {
1438
1439#ifndef NDEBUG
1442 "Number of rows in matrix should be multiple of space dimensions");
1443#endif
1444
1445
1446 if constexpr (COORDINATE_SYSTEM ==
POLAR || COORDINATE_SYSTEM ==
SPHERICAL)
1448 "%s coordiante not implemented",
1450
1451 auto t_w = this->getFTensor0IntegrationWeight();
1452 auto t_coords = this->getFTensor1CoordsAtGaussPts();
1453 size_t nb_base_functions_row = row_data.getN().size2();
1454 auto t_row_base = row_data.getFTensor0N();
1455 const double vol = this->getMeasure();
1457
1458 const double alpha =
1459 alphaConstant(t_coords(0), t_coords(1), t_coords(2)) * t_w * vol;
1460
1461 size_t rr = 0;
1462 auto t_m = getFTensor1FromPtr<SPACE_DIM>(
OpBase::locMat.data().data());
1463
1464
1465 if constexpr (COORDINATE_SYSTEM ==
CARTESIAN) {
1467 const double r_val = alpha * t_row_base;
1468 auto t_col_diff_base = col_data.getFTensor1DiffN<
SPACE_DIM>(gg, 0);
1470 t_m(
i) += r_val * t_col_diff_base(
i);
1471 ++t_col_diff_base;
1472 ++t_m;
1473 }
1474 ++t_row_base;
1475 }
1476 }
1477
1478
1481 const double r_val = alpha * t_row_base;
1482 auto t_col_base = col_data.getFTensor0N(gg, 0);
1483 auto t_col_diff_base = col_data.getFTensor1DiffN<
SPACE_DIM>(gg, 0);
1485 t_m(
i) += r_val * t_col_diff_base(
i);
1486 t_m(0) += (r_val / t_coords(0)) * t_col_base;
1487 ++t_col_base;
1488 ++t_col_diff_base;
1489 ++t_m;
1490 }
1491 ++t_row_base;
1492 }
1493 }
1494
1495 for (; rr < nb_base_functions_row; ++rr)
1496 ++t_row_base;
1497
1498 ++t_w;
1499 ++t_coords;
1500 }
1501
1503}
static const char *const CoordinateTypesNames[]
Coordinate system names.
#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()
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
FTensor::Index< 'i', SPACE_DIM > i
summit Index