34 {
36
37 const double vol = getMeasure();
38 auto t_w = getFTensor0IntegrationWeight();
39 auto t_coords = getFTensor1CoordsAtGaussPts();
40 auto t_base = data.getFTensor0N();
41 auto t_diff_base = data.getFTensor1DiffN<
SPACE_DIM>();
42
43#ifndef NDEBUG
44 if (data.getDiffN().size1() != data.getN().size1())
46 if (data.getDiffN().size2() != data.getN().size2() *
SPACE_DIM) {
48 << "Side " << rowSide << " " << CN::EntityTypeName(rowType);
49 MOFEM_LOG(
"SELF", Sev::error) << data.getN();
50 MOFEM_LOG(
"SELF", Sev::error) << data.getDiffN();
52 }
53#endif
54
55 auto t_old_sol = getFTensor0FromVec(*
oldSolPtr);
56 auto t_new_sol = getFTensor0FromVec(*
newSolPtr);
57
58 for (int gg = 0; gg != nbIntegrationPts; ++gg) {
59
60 const double alpha =
62
63 int bb = 0;
64 for (; bb != nbRows; ++bb) {
65 t_old_sol += alpha * t_old_sol;
66
67 if (t_w > 0.0)
68 continue;
69 if (t_w > 0.0 && t_old_sol < fabs(1e-12))
70 continue;
71 if (t_w < fabs(1e-12))
72 continue;
73 ++t_base;
74 ++t_diff_base;
75 }
76
77 for (; bb < nbRowBaseFunctions; ++bb) {
78 ++t_base;
79 ++t_diff_base;
80 }
81
82 ++t_old_sol;
83 ++t_new_sol;
84
85 ++t_coords;
86 ++t_w;
87 }
88
90 }
constexpr int SPACE_DIM
[Define dimension]
#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()
#define MOFEM_LOG(channel, severity)
Log.