84 {
86
87 if (
auto data_ptr =
dataPtr.lock()) {
88
89 const auto nb_eval_points = data_ptr->nbEvalPoints;
90 const auto &shape_functions = data_ptr->shapeFunctions;
91 const auto &eval_pointentity_handle = data_ptr->evalPointEntityHandle;
92
93 if (auto fe_ptr = data_ptr->feMethodPtr) {
94
96
97#ifndef NDEBUG
98 if (fe_ptr.get() != fe_raw_ptr)
100#endif
101
102 const auto fe_ent = fe.numeredEntFiniteElementPtr->getEnt();
104 const auto fe_dim = moab::CN::Dimension(fe_type);
105
106 auto &gauss_pts = fe.gaussPts;
107 int nb_gauss_pts;
108
109 if (fe_dim == 3) {
110 gauss_pts.resize(4, nb_eval_points, false);
112 &shape_functions(0, 0), &shape_functions(0, 1),
113 &shape_functions(0, 2), &shape_functions(0, 3)};
115 &gauss_pts(0, 0), &gauss_pts(1, 0), &gauss_pts(2, 0)};
116
117 nb_gauss_pts = 0;
118 for (int nn = 0; nn != nb_eval_points; ++nn) {
119 if (eval_pointentity_handle[nn] == fe_ent) {
120 for (
const int i : {0, 1, 2}) {
121 t_gauss_pts(
i) = t_shape(
i + 1);
122 }
123 gauss_pts(3, nb_gauss_pts) = nn;
124 ++t_gauss_pts;
125 ++nb_gauss_pts;
126 }
127 ++t_shape;
128 }
129 gauss_pts.resize(4, nb_gauss_pts, true);
130 } else if (fe_dim == 2) {
131 gauss_pts.resize(3, nb_eval_points, false);
133 &shape_functions(0, 0), &shape_functions(0, 1),
134 &shape_functions(0, 2)};
136 &gauss_pts(0, 0), &gauss_pts(1, 0)};
137 nb_gauss_pts = 0;
138 for (int nn = 0; nn != nb_eval_points; ++nn) {
139 if (eval_pointentity_handle[nn] == fe_ent) {
140 for (
const int i : {0, 1}) {
141 t_gauss_pts(
i) = t_shape(
i + 1);
142 }
143 gauss_pts(2, nb_gauss_pts) = nn;
144 ++t_gauss_pts;
145 ++nb_gauss_pts;
146 }
147 ++t_shape;
148 }
149 gauss_pts.resize(3, nb_gauss_pts, true);
150 } else {
152 "Dimension not implemented");
153 }
154
155#ifndef NDEBUG
157 << "nbEvalOPoints / nbGau_sspt_s: " << nb_eval_points << " / "
158 << nb_gauss_pts;
159 MOFEM_LOG(
"SELF", Sev::noisy) <<
"gauss pts: " << gauss_pts;
160#endif
161
162 } else
164 "Pointer to element does not exists");
165
166 } else
168 "Pointer to data does not exists");
169
171}
#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