Integrate grad-grad operator.
945 {
947
949
954
955 auto &row_hessian = row_data.getN(BaseDerivatives::SecondDerivative);
956 auto &col_hessian = col_data.getN(BaseDerivatives::SecondDerivative);
957
958#ifndef NDEBUG
961 "Wrong number of integration pts (%d != %d)",
963 }
964 if (row_hessian.size2() !=
967 "Wrong number of base functions (%d != %d)",
970 }
973 "Wrong number of base functions (%d < %d)", row_hessian.size2(),
975 }
978 "Wrong number of integration pts (%d != %d)",
980 }
983 "Wrong number of base functions (%d < %d)", col_hessian.size2(),
985 }
986#endif
987
988
989 double vol = OpBase::getMeasure();
990
991
992 auto t_w = OpBase::getFTensor0IntegrationWeight();
993
994 auto t_row_diff2 = getFTensor2SymmetricLowerFromPtr<SPACE_DIM>(
995 &*row_hessian.data().begin());
996
997
998
999 auto t_D = getFTensor4DdgFromMat<SPACE_DIM, SPACE_DIM, S>(*
matD);
1000
1001
1003
1004
1005 double a = t_w * vol;
1006
1007
1009
1010
1011 int rr = 0;
1013
1015 t_rowD(
k,
l) = t_D(
i,
j,
k,
l) * (
a * t_row_diff2(
i,
j));
1016
1017
1018 auto t_col_diff2 =
1019 getFTensor2SymmetricLowerFromPtr<SPACE_DIM>(&col_hessian(gg, 0));
1020
1021
1023
1024
1025 *m_ptr += t_rowD(
i,
j) * t_col_diff2(
i,
j);
1026
1027
1028 ++t_col_diff2;
1029
1030
1031 ++m_ptr;
1032 }
1033
1034
1035 ++t_row_diff2;
1036 }
1037
1039 ++t_row_diff2;
1040
1041
1042 ++t_w;
1043 ++t_D;
1044 }
1045 }
1046
1048}
#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