71 {
73
74 if (
auto data_ptr =
dataPtr.lock()) {
75
76 const auto nb_eval_points = data_ptr->nbEvalPoints;
77 const auto &shape_functions = data_ptr->shapeFunctions;
78 const auto &eval_pointentity_handle = data_ptr->evalPointEntityHandle;
79
80 if (auto fe_ptr = data_ptr->feMethodPtr.lock()) {
81
82 auto &fe = static_cast<ForcesAndSourcesCore &>(*fe_ptr);
83
84#ifndef NDEBUG
85 if (fe_ptr.get() != fe_raw_ptr)
87#endif
88
89 const auto fe_ent = fe.numeredEntFiniteElementPtr->getEnt();
91 const auto fe_dim = moab::CN::Dimension(fe_type);
92
93 auto &gauss_pts = fe.gaussPts;
94 int nb_gauss_pts;
95
96 if (fe_dim == 3) {
97 gauss_pts.resize(4, nb_eval_points, false);
99 &shape_functions(0, 0), &shape_functions(0, 1),
100 &shape_functions(0, 2), &shape_functions(0, 3)};
102 &gauss_pts(0, 0), &gauss_pts(1, 0), &gauss_pts(2, 0)};
103
104 nb_gauss_pts = 0;
105 for (int nn = 0; nn != nb_eval_points; ++nn) {
106 if (eval_pointentity_handle[nn] == fe_ent) {
107 for (
const int i : {0, 1, 2}) {
108 t_gauss_pts(
i) = t_shape(
i + 1);
109 }
110 gauss_pts(3, nb_gauss_pts) = nn;
111 ++t_gauss_pts;
112 ++nb_gauss_pts;
113 }
114 ++t_shape;
115 }
116 gauss_pts.resize(4, nb_gauss_pts, true);
117 } else if (fe_dim == 2) {
118 gauss_pts.resize(3, nb_eval_points, false);
120 &shape_functions(0, 0), &shape_functions(0, 1),
121 &shape_functions(0, 2)};
123 &gauss_pts(0, 0), &gauss_pts(1, 0)};
124 nb_gauss_pts = 0;
125 for (int nn = 0; nn != nb_eval_points; ++nn) {
126 if (eval_pointentity_handle[nn] == fe_ent) {
127 for (
const int i : {0, 1}) {
128 t_gauss_pts(
i) = t_shape(
i + 1);
129 }
130 gauss_pts(2, nb_gauss_pts) = nn;
131 ++t_gauss_pts;
132 ++nb_gauss_pts;
133 }
134 ++t_shape;
135 }
136 gauss_pts.resize(3, nb_gauss_pts, true);
137 } else {
139 "Dimension not implemented");
140 }
141
142#ifndef NDEBUG
144 << "nbEvalOPoints / nbGau_sspt_s: " << nb_eval_points << " / "
145 << nb_gauss_pts;
146 MOFEM_LOG(
"SELF", Sev::noisy) <<
"gauss pts: " << gauss_pts;
147#endif
148
149 } else
151 "Pointer to element does not exists");
152
153 } else
155 "Pointer to data does not exists");
156
158}
#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