Integrate grad-grad operator.
1259 {
1261
1262#ifndef NDEBUG
1265 "Number of rows in matrix should be multiple of space dimensions");
1266#endif
1267
1268
1269 if constexpr (COORDINATE_SYSTEM ==
POLAR || COORDINATE_SYSTEM ==
SPHERICAL)
1271 "%s coordiante not implemented",
1273
1274 auto t_w = this->getFTensor0IntegrationWeight();
1275 auto t_coords = this->getFTensor1CoordsAtGaussPts();
1276 size_t nb_base_functions_row = row_data.getN().size2();
1277 auto t_row_base = row_data.getFTensor0N();
1278 const double vol = this->getMeasure();
1280
1281 const double alpha =
1282 alphaConstant(t_coords(0), t_coords(1), t_coords(2)) * t_w * vol;
1283
1284 size_t rr = 0;
1285 auto t_m = getFTensor1FromPtr<SPACE_DIM>(
OpBase::locMat.data().data());
1286
1287
1288 if constexpr (COORDINATE_SYSTEM ==
CARTESIAN) {
1290 const double r_val =
alpha * t_row_base;
1291 auto t_col_diff_base = col_data.getFTensor1DiffN<
SPACE_DIM>(gg, 0);
1293 t_m(
i) += r_val * t_col_diff_base(
i);
1294 ++t_col_diff_base;
1295 ++t_m;
1296 }
1297 ++t_row_base;
1298 }
1299 }
1300
1301
1304 const double r_val =
alpha * t_row_base;
1305 auto t_col_base = col_data.getFTensor0N(gg, 0);
1306 auto t_col_diff_base = col_data.getFTensor1DiffN<
SPACE_DIM>(gg, 0);
1308 t_m(
i) += r_val * t_col_diff_base(
i);
1309 t_m(0) += (r_val / t_coords(0)) * t_col_base;
1310 ++t_col_base;
1311 ++t_col_diff_base;
1312 ++t_m;
1313 }
1314 ++t_row_base;
1315 }
1316 }
1317
1318 for (; rr < nb_base_functions_row; ++rr)
1319 ++t_row_base;
1320
1321 ++t_w;
1322 ++t_coords;
1323 }
1324
1326}
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