1473 {
1475
1476 const double vol = getMeasure();
1477 auto t_h = getFTensor0FromVec(*
hPtr);
1478
1479 auto t_row_base = row_data.getFTensor0N();
1480 auto t_row_diff_base = row_data.getFTensor1DiffN<
SPACE_DIM>();
1481 auto t_w = getFTensor0IntegrationWeight();
1482 auto t_coords = getFTensor1CoordsAtGaussPts();
1483
1484 for (int gg = 0; gg != nbIntegrationPts; ++gg) {
1485
1486 const double r = t_coords(0);
1488
1489 const double f_dh =
get_f_dh(t_h) * alpha;
1490 const double beta =
eta2 * alpha;
1491
1492 int rr = 0;
1493 for (; rr != nbRows; ++rr) {
1494
1495 auto t_col_base = col_data.getFTensor0N(gg, 0);
1496 auto t_col_diff_base = col_data.getFTensor1DiffN<
SPACE_DIM>(gg, 0);
1497
1498 for (int cc = 0; cc != nbCols; ++cc) {
1499
1500 if constexpr (
I ==
false)
1501 locMat(rr, cc) -= (t_row_base * t_col_base) * f_dh;
1502 locMat(rr, cc) -= (t_row_diff_base(
i) * beta) * t_col_diff_base(
i);
1503
1504 ++t_col_base;
1505 ++t_col_diff_base;
1506 }
1507
1508 ++t_row_base;
1509 ++t_row_diff_base;
1510 }
1511
1512 for (; rr < nbRowBaseFunctions; ++rr) {
1513 ++t_row_base;
1514 ++t_row_diff_base;
1515 }
1516
1517 ++t_h;
1518 ++t_w;
1519 ++t_coords;
1520 }
1521
1523 }
#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()
auto cylindrical
[cylindrical]
auto get_f_dh
Derivative of double-well potential.
FTensor::Index< 'i', SPACE_DIM > i
constexpr IntegrationType I