807 {
809
810 const double vol = getMeasure();
811 auto t_w = getFTensor0IntegrationWeight();
812 auto t_coords = getFTensor1CoordsAtGaussPts();
813 auto t_base = data.getFTensor0N();
814 auto t_diff_base = data.getFTensor1DiffN<
SPACE_DIM>();
815
816#ifndef NDEBUG
817 if (data.getDiffN().size1() != data.getN().size1())
819 if (data.getDiffN().size2() != data.getN().size2() *
SPACE_DIM) {
821 << "Side " << rowSide << " " << CN::EntityTypeName(rowType);
822 MOFEM_LOG(
"SELF", Sev::error) << data.getN();
823 MOFEM_LOG(
"SELF", Sev::error) << data.getDiffN();
825 }
826#endif
827
829
830 auto t_h = getFTensor0FromVec(*
hPtr);
831 auto t_grad_g = getFTensor1FromMat<SPACE_DIM>(*
gradGPtr);
832
833 for (int gg = 0; gg != nbIntegrationPts; ++gg) {
834
835 const double r = t_coords(0);
837
838 const double set_h =
init_h(t_coords(0), t_coords(1), t_coords(2));
840
841 int bb = 0;
842 for (; bb != nbRows; ++bb) {
843 locF[bb] += (t_base *
alpha) * (t_h - set_h);
844 locF[bb] += (t_diff_base(
i) *
m) * t_grad_g(
i);
845 ++t_base;
846 ++t_diff_base;
847 }
848
849 for (; bb < nbRowBaseFunctions; ++bb) {
850 ++t_base;
851 ++t_diff_base;
852 }
853
854 ++t_h;
855 ++t_grad_g;
856
857 ++t_coords;
858 ++t_w;
859 }
860
861 } else {
862
863 auto t_dot_h = getFTensor0FromVec(*
dotHPtr);
864 auto t_h = getFTensor0FromVec(*
hPtr);
865 auto t_u = getFTensor1FromMat<U_FIELD_DIM>(*
uPtr);
866 auto t_grad_h = getFTensor1FromMat<SPACE_DIM>(*
gradHPtr);
867 auto t_grad_g = getFTensor1FromMat<SPACE_DIM>(*
gradGPtr);
868
869 for (int gg = 0; gg != nbIntegrationPts; ++gg) {
870
871 const double r = t_coords(0);
873
875
876 int bb = 0;
877 for (; bb != nbRows; ++bb) {
878 locF[bb] += (t_base *
alpha) * (t_dot_h);
879 locF[bb] += (t_base *
alpha) * (t_grad_h(
i) * t_u(
i));
880 locF[bb] += (t_diff_base(
i) * t_grad_g(
i)) *
m;
881 ++t_base;
882 ++t_diff_base;
883 }
884
885 for (; bb < nbRowBaseFunctions; ++bb) {
886 ++t_base;
887 ++t_diff_base;
888 }
889
890 ++t_dot_h;
891 ++t_h;
892 ++t_grad_g;
893 ++t_u;
894 ++t_grad_h;
895
896 ++t_coords;
897 ++t_w;
898 }
899 }
900
902 }
#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< 'm', SPACE_DIM > m
auto init_h
Initialisation function.
#define MOFEM_LOG(channel, severity)
Log.
FTensor::Index< 'i', SPACE_DIM > i
constexpr IntegrationType I