896 {
898
899 const double vol = getMeasure();
900 auto t_grad_h = getFTensor1FromMat<SPACE_DIM>(*
gradHPtr);
901 auto t_coords = getFTensor1CoordsAtGaussPts();
902
903 auto t_row_base = row_data.getFTensor0N();
904 auto t_w = getFTensor0IntegrationWeight();
905
906 for (int gg = 0; gg != nbIntegrationPts; gg++) {
907
908 const double r = t_coords(0);
910
912 t_phase_force_dg(
i) = -alpha *
kappa * t_grad_h(
i);
913
914 int rr = 0;
916 auto t_mat =
918 DataLayoutTraits<DataLayout::CoeffsByGauss>>(
920 auto t_col_base = col_data.getFTensor0N(gg, 0);
921
922 for (int cc = 0; cc != nbCols; ++cc) {
923 const double bb = t_row_base * t_col_base;
924 t_mat(
i) += t_phase_force_dg(
i) * bb;
925
926 ++t_mat;
927 ++t_col_base;
928 }
929
930 ++t_row_base;
931 }
932
933 for (; rr < nbRowBaseFunctions; ++rr) {
934 ++t_row_base;
935 }
936
937 ++t_grad_h;
938 ++t_coords;
939 ++t_w;
940 }
941
943 }
#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]
constexpr int U_FIELD_DIM
FTensor::Index< 'i', SPACE_DIM > i
auto getFTensor1FromMat(M &data, int rr=0, int cc=0)
Get tensor rank 1 (vector) form data matrix.