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