975 {
977
978 const double vol = getMeasure();
979 auto t_w = getFTensor0IntegrationWeight();
980 auto t_coords = getFTensor1CoordsAtGaussPts();
981 auto t_base = data.getFTensor0N();
982 auto t_diff_base = data.getFTensor1DiffN<
SPACE_DIM>();
983
984#ifndef NDEBUG
985 if (data.getDiffN().size1() != data.getN().size1())
987 if (data.getDiffN().size2() != data.getN().size2() *
SPACE_DIM) {
989 << "Side " << rowSide << " " << CN::EntityTypeName(rowType);
990 MOFEM_LOG(
"SELF", Sev::error) << data.getN();
991 MOFEM_LOG(
"SELF", Sev::error) << data.getDiffN();
993 }
994#endif
995
997
998
999 auto t_h = getFTensor0FromVec(*
hPtr);
1000 auto t_grad_g = getFTensor1FromMat<SPACE_DIM>(*
gradGPtr);
1001
1002 for (int gg = 0; gg != nbIntegrationPts; ++gg) {
1003
1004 const double r = t_coords(0);
1006
1007 const double set_h =
init_h(t_coords(0), t_coords(1), t_coords(2));
1008 const double m =
get_M(set_h) * alpha;
1009
1010 int bb = 0;
1011 for (; bb != nbRows; ++bb) {
1012 locF[bb] += (t_base * alpha) * (t_h - set_h);
1013 locF[bb] += (t_diff_base(
i) *
m) * t_grad_g(
i);
1014 ++t_base;
1015 ++t_diff_base;
1016 }
1017
1018 for (; bb < nbRowBaseFunctions; ++bb) {
1019 ++t_base;
1020 ++t_diff_base;
1021 }
1022
1023 ++t_h;
1024 ++t_grad_g;
1025
1026 ++t_coords;
1027 ++t_w;
1028 }
1029
1030 } else {
1031
1032 auto t_dot_h = getFTensor0FromVec(*
dotHPtr);
1033 auto t_h = getFTensor0FromVec(*
hPtr);
1034 auto t_u = getFTensor1FromMat<U_FIELD_DIM>(*
uPtr);
1035 auto t_grad_h = getFTensor1FromMat<SPACE_DIM>(*
gradHPtr);
1036 auto t_grad_g = getFTensor1FromMat<SPACE_DIM>(*
gradGPtr);
1037
1038 for (int gg = 0; gg != nbIntegrationPts; ++gg) {
1039
1040 const double r = t_coords(0);
1042
1043 const double m =
get_M(t_h) * alpha;
1044
1045 int bb = 0;
1046 for (; bb != nbRows; ++bb) {
1047 locF[bb] += (t_base * alpha) * (t_dot_h);
1048 locF[bb] += (t_base * alpha) * (t_grad_h(
i) * t_u(
i));
1049 locF[bb] += (t_diff_base(
i) * t_grad_g(
i)) *
m;
1050 ++t_base;
1051 ++t_diff_base;
1052 }
1053
1054 for (; bb < nbRowBaseFunctions; ++bb) {
1055 ++t_base;
1056 ++t_diff_base;
1057 }
1058
1059 ++t_dot_h;
1060 ++t_h;
1061 ++t_grad_g;
1062 ++t_u;
1063 ++t_grad_h;
1064
1065 ++t_coords;
1066 ++t_w;
1067 }
1068 }
1069
1071 }
#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()
auto cylindrical
[cylindrical]
auto init_h
Initialisation function.
#define MOFEM_LOG(channel, severity)
Log.
FTensor::Index< 'i', SPACE_DIM > i
constexpr IntegrationType I
FTensor::Index< 'm', 3 > m