Integrate grad-grad operator.
995 {
997
999
1004
1005 auto &row_hessian = row_data.getN(BaseDerivatives::SecondDerivative);
1006 auto &col_hessian = col_data.getN(BaseDerivatives::SecondDerivative);
1007
1008#ifndef NDEBUG
1011 "Wrong number of integration pts (%d != %d)",
1013 }
1014 if (row_hessian.size2() !=
1017 "Wrong number of base functions (%d != %d)",
1020 }
1023 "Wrong number of base functions (%d < %d)", row_hessian.size2(),
1025 }
1028 "Wrong number of integration pts (%d != %d)",
1030 }
1033 "Wrong number of base functions (%d < %d)", col_hessian.size2(),
1035 }
1036#endif
1037
1038
1039 double vol = OpBase::getMeasure();
1040
1041
1042 auto t_w = OpBase::getFTensor0IntegrationWeight();
1043
1044 auto t_row_diff2 = getFTensor2SymmetricLowerFromPtr<SPACE_DIM>(
1045 &*row_hessian.data().begin());
1046
1047
1048
1049 auto t_D = getFTensor4DdgFromMat<SPACE_DIM, SPACE_DIM, S>(*
matD);
1050
1051
1053
1054
1055 double a = t_w * vol;
1056
1057
1059
1060
1061 int rr = 0;
1063
1065 t_rowD(
k,
l) = t_D(
i,
j,
k,
l) * (
a * t_row_diff2(
i,
j));
1066
1067
1068 auto t_col_diff2 =
1069 getFTensor2SymmetricLowerFromPtr<SPACE_DIM>(&col_hessian(gg, 0));
1070
1071
1073
1074
1075 *m_ptr += t_rowD(
i,
j) * t_col_diff2(
i,
j);
1076
1077
1078 ++t_col_diff2;
1079
1080
1081 ++m_ptr;
1082 }
1083
1084
1085 ++t_row_diff2;
1086 }
1087
1089 ++t_row_diff2;
1090
1091
1092 ++t_w;
1093 ++t_D;
1094 }
1095 }
1096
1098}
#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()
FTensor::Index< 'l', 3 > l
FTensor::Index< 'j', 3 > j
FTensor::Index< 'k', 3 > k
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
FTensor::Index< 'i', SPACE_DIM > i
summit Index