86 {
88
89 if (
auto data_ptr =
dataPtr.lock()) {
90
91 const auto nb_eval_points = data_ptr->nbEvalPoints;
92 const auto &shape_functions = data_ptr->shapeFunctions;
93 const auto &eval_pointentity_handle = data_ptr->evalPointEntityHandle;
94
95 if (auto fe_ptr = data_ptr->feMethodPtr) {
96
97 auto &fe = static_cast<ForcesAndSourcesCore &>(*fe_ptr);
98
99#ifndef NDEBUG
100 if (fe_ptr.get() != fe_raw_ptr)
102#endif
103
104 const auto fe_ent = fe.numeredEntFiniteElementPtr->getEnt();
106 const auto fe_dim = moab::CN::Dimension(fe_type);
107
108 auto &gauss_pts = fe.gaussPts;
109 int nb_gauss_pts;
110
111 if (fe_dim == 3) {
112 gauss_pts.resize(4, nb_eval_points, false);
113 nb_gauss_pts = 0;
114 for (int nn = 0; nn != nb_eval_points; ++nn) {
115 if (eval_pointentity_handle[nn] == fe_ent) {
116 for (
const int i : {0, 1, 2})
117 gauss_pts(
i, nb_gauss_pts) = shape_functions(nn,
i + 1);
118 gauss_pts(3, nb_gauss_pts) = nn;
119 ++nb_gauss_pts;
120 }
121 }
122 gauss_pts.resize(4, nb_gauss_pts, true);
123 } else if (fe_dim == 2) {
124 gauss_pts.resize(3, nb_eval_points, false);
125 nb_gauss_pts = 0;
126 for (int nn = 0; nn != nb_eval_points; ++nn) {
127 if (eval_pointentity_handle[nn] == fe_ent) {
128 for (
const int i : {0, 1})
129 gauss_pts(
i, nb_gauss_pts) = shape_functions(nn,
i + 1);
130 gauss_pts(2, nb_gauss_pts) = nn;
131 ++nb_gauss_pts;
132 }
133 }
134 gauss_pts.resize(3, nb_gauss_pts, true);
135 } else {
137 "Dimension not implemented");
138 }
139
140#ifndef NDEBUG
142 << "nbEvalOPoints / nbGau_sspt_s: " << nb_eval_points << " / "
143 << nb_gauss_pts;
144 MOFEM_LOG(
"SELF", Sev::noisy) <<
"gauss pts: " << gauss_pts;
145#endif
146
147 } else
149 "Pointer to element does not exists");
150
151 } else
153 "Pointer to data does not exists");
154
156}
#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.
FTensor::Index< 'i', SPACE_DIM > i
auto type_from_handle(const EntityHandle h)
get type from entity handle