v0.16.0
Loading...
Searching...
No Matches
EntitiesFieldData.cpp
Go to the documentation of this file.
1/** \file EntitiesFieldData.cpp
2\brief Implementation for Data Structures in Forces and Sources
3
4*/
5
6
7
8namespace MoFEM {
9
10EntitiesFieldData::EntData::EntData(const bool allocate_base_matrices)
11 : sEnse(0), oRder(0), bAse(NOBASE), entDataBitRefLevel(),
12 N(baseFunctionsAndBaseDerivatives[ZeroDerivative]),
13 diffN(baseFunctionsAndBaseDerivatives[FirstDerivative]) {
14 if (allocate_base_matrices) {
15
16 for (auto d = 0; d != LastDerivative; ++d) {
17 for (int b = 0; b != LASTBASE; ++b) {
19 }
20 }
21 } else {
22
23 // set null to all base function pointers
24 for (auto d = 0; d != LastDerivative; ++d) {
25 std::fill(baseFunctionsAndBaseDerivatives[d].begin(),
26 baseFunctionsAndBaseDerivatives[d].end(), nullptr);
27 }
28 }
29}
30
31int EntitiesFieldData::EntData::getSense() const { return sEnse; }
32
33boost::shared_ptr<MatrixDouble> &
35 const BaseDerivatives derivative) {
36 return baseFunctionsAndBaseDerivatives[derivative][base];
37}
38
39boost::shared_ptr<MatrixDouble> &
43
44boost::shared_ptr<MatrixDouble> &EntitiesFieldData::EntData::getDiffNSharedPtr(
45 const FieldApproximationBase base) {
46 return diffN[base];
47}
48
49static void constructor_data(EntitiesFieldData *data, const EntityType type) {
50
52
53 auto set_default = [&]() {
54 std::array<size_t, MBMAXTYPE> count;
55 std::fill(count.begin(), count.end(), 0);
56 const int dim_type = moab::CN::Dimension(type);
57 data->dataOnEntities[MBVERTEX].resize(1);
58 if (type != MBVERTEX) {
59 for (auto dd = dim_type; dd > 0; --dd) {
60 int nb_ents = moab::CN::NumSubEntities(type, dd);
61 for (int ii = 0; ii != nb_ents; ++ii) {
62 auto sub_ent_type = moab::CN::SubEntityType(type, dd, ii);
63 count[sub_ent_type] = nb_ents;
64 }
65 for (auto tt = moab::CN::TypeDimensionMap[dd].first;
66 tt <= moab::CN::TypeDimensionMap[dd].second; ++tt) {
67 data->dataOnEntities[tt].resize(count[tt]);
68 }
69 }
70 }
71 };
72
73 switch (type) {
74 case MBENTITYSET:
75 break;
76
77 default:
78 set_default();
79 }
80}
81
85
91
92static void
94 const boost::shared_ptr<EntitiesFieldData> &data_ptr) {
95
97 using DerivedEntData = DerivedEntitiesFieldData::DerivedEntData;
98
99 for (int tt = MBVERTEX; tt != MBMAXTYPE; ++tt) {
100 auto &ent_data = data_ptr->dataOnEntities[tt];
101 auto &derived_ent_data = derived_data->dataOnEntities[tt];
102 for (auto c = derived_ent_data.size(); c < ent_data.size(); ++c) {
103 boost::shared_ptr<EntData> ent_data_ptr(data_ptr, &ent_data[c]);
104 derived_ent_data.push_back(new DerivedEntData(ent_data_ptr));
105 }
106 derived_ent_data.resize(ent_data.size());
107 }
108}
109
111 const boost::shared_ptr<EntitiesFieldData> &data_ptr)
112 : EntitiesFieldData(), dataPtr(data_ptr) {
114}
115
121
124 sPace = NOSPACE;
125 bAse = NOBASE;
126 fieldEntities.resize(0, false);
127 iNdices.resize(0, false);
128 localIndices.resize(0, false);
129 dOfs.resize(0, false);
130 fieldData.resize(0, false);
132}
133
136 for (EntityType t = MBVERTEX; t != MBMAXTYPE; t++)
137 for (auto &e : dataOnEntities[t])
138 CHKERR e.resetFieldDependentData();
140}
141
144 const FieldApproximationBase base) {
146 auto make_swap = [](boost::shared_ptr<MatrixDouble> &ptr,
147 boost::shared_ptr<MatrixDouble> &ptrBB,
148 boost::shared_ptr<MatrixDouble> &swap_ptr) {
149 if (swap_ptr) {
150 ptr = swap_ptr;
151 swap_ptr.reset();
152 } else {
153 swap_ptr = ptr;
154 ptr = ptrBB;
155 }
156 };
157 make_swap(getNSharedPtr(base), getBBNSharedPtr(field_name), swapBaseNPtr);
158 make_swap(getDiffNSharedPtr(base), getBBDiffNSharedPtr(field_name),
159 swapBaseDiffNPtr);
161}
162
164 const FieldApproximationBase base) {
166 // Note: Do not swap bases on entities sets
167 for (int tt = MBVERTEX; tt != MBENTITYSET; ++tt) {
168 auto &ent_data = dataOnEntities[tt];
169 for (auto &side_data : ent_data)
170 CHKERR side_data.baseSwap(field_name, base);
171 }
173}
174
176 const std::string &field_name, const FieldApproximationBase base) {
178 auto make_swap = [](boost::shared_ptr<MatrixDouble> &ptr,
179 boost::shared_ptr<MatrixDouble> &ptrBB,
180 boost::shared_ptr<MatrixDouble> &swap_ptr) {
181 if (swap_ptr) {
182 ptr = swap_ptr;
183 swap_ptr.reset();
184 } else {
185 swap_ptr = ptr;
186 ptr = ptrBB;
187 }
188 };
189 make_swap(getDerivedNSharedPtr(base), getBBNSharedPtr(field_name),
190 swapBaseNPtr);
191 make_swap(getDerivedDiffNSharedPtr(base), getBBDiffNSharedPtr(field_name),
192 swapBaseDiffNPtr);
194}
195
197 const boost::shared_ptr<EntitiesFieldData::EntData> &ent_data_ptr)
198 : EntitiesFieldData::EntData(false), entDataPtr(ent_data_ptr) {}
199
201 return entDataPtr->getSense();
202}
203
204boost::shared_ptr<MatrixDouble> &
206 const FieldApproximationBase base, const BaseDerivatives derivative) {
207 if (baseFunctionsAndBaseDerivatives[derivative][base])
208 return baseFunctionsAndBaseDerivatives[derivative][base];
209 else
210 return entDataPtr->getNSharedPtr(base, derivative);
211}
212
213boost::shared_ptr<MatrixDouble> &
215 const FieldApproximationBase base) {
216 if (N[base])
217 return N[base];
218 else
219 return entDataPtr->getNSharedPtr(base);
220}
221
222boost::shared_ptr<MatrixDouble> &
224 const FieldApproximationBase base) {
225 if (diffN[base])
226 return diffN[base];
227 else
228 return entDataPtr->getDiffNSharedPtr(base);
229}
230const boost::shared_ptr<MatrixDouble> &
232 const FieldApproximationBase base) const {
233 if (N[base])
234 return N[base];
235 else
236 return entDataPtr->getNSharedPtr(base);
237}
238const boost::shared_ptr<MatrixDouble> &
240 const FieldApproximationBase base) const {
241 if (diffN[base])
242 return diffN[base];
243 else
244 return entDataPtr->getDiffNSharedPtr(base);
245}
246
247std::ostream &operator<<(std::ostream &os,
249 os << "sEnse: " << e.getSense() << std::endl
250 << "oRder: " << e.getOrder() << std::endl
251 << "global indices: " << e.getIndices() << std::endl
252 << "local indices: " << e.getLocalIndices() << std::endl;
253 // FIXME: precision should not be set here
254 os << "fieldData: " << std::fixed << std::setprecision(2) << e.getFieldData()
255 << std::endl;
256 MatrixDouble base = const_cast<EntitiesFieldData::EntData &>(e).getN();
257 MatrixDouble diff_base =
258 const_cast<EntitiesFieldData::EntData &>(e).getDiffN();
259 const double eps = 1e-6;
260 for (unsigned int ii = 0; ii != base.size1(); ii++) {
261 for (unsigned int jj = 0; jj != base.size2(); jj++) {
262 if (fabs(base(ii, jj)) < eps)
263 base(ii, jj) = 0;
264 }
265 }
266 for (unsigned int ii = 0; ii != diff_base.size1(); ii++) {
267 for (unsigned int jj = 0; jj != diff_base.size2(); jj++) {
268 if (fabs(diff_base(ii, jj)) < eps)
269 diff_base(ii, jj) = 0;
270 }
271 }
272 os << "N: " << std::fixed << base << std::endl
273 << "diffN: " << std::fixed << diff_base;
274 return os;
275}
276
277std::ostream &operator<<(std::ostream &os, const EntitiesFieldData &e) {
278 for (EntityType t = MBVERTEX; t != MBMAXTYPE; ++t) {
279 for (unsigned int nn = 0; nn < e.dataOnEntities[t].size(); nn++) {
280 os << "dataOnEntities[" << moab::CN::EntityTypeName(t) << "][" << nn
281 << "]" << std::endl
282 << e.dataOnEntities[t][nn] << std::endl;
283 }
284 }
285 return os;
286}
287
288/**@}*/
289
290/** \name Specializations for HDiv/HCrul */
291
292/**@{*/
293
294template <int Tensor_Dim0, int Tensor_Dim1>
296 Tensor_Dim0, Tensor_Dim1>
298 std::stringstream s;
299 s << "Template for tensor dimension " << Tensor_Dim0 << "x" << Tensor_Dim1
300 << " not implemented";
301 THROW_MESSAGE(s.str());
303}
304
305template <int Tensor_Dim0, int Tensor_Dim1>
307 Tensor_Dim0, Tensor_Dim1>
309 const int gg, const int bb) {
310 std::stringstream s;
311 s << "Template for tensor dimension " << Tensor_Dim0 << "x" << Tensor_Dim1
312 << " not implemented";
313 THROW_MESSAGE(s.str());
315}
316
317template <>
319EntitiesFieldData::EntData::getFTensor2DiffN<3, 3>(
321 double *t_diff_n_ptr = &*getDiffN(base).data().begin();
323 t_diff_n_ptr, &t_diff_n_ptr[HVEC0_1], &t_diff_n_ptr[HVEC0_2],
324 &t_diff_n_ptr[HVEC1_0], &t_diff_n_ptr[HVEC1_1], &t_diff_n_ptr[HVEC1_2],
325 &t_diff_n_ptr[HVEC2_0], &t_diff_n_ptr[HVEC2_1], &t_diff_n_ptr[HVEC2_2]);
326}
327
328template <>
330EntitiesFieldData::EntData::getFTensor2DiffN<3, 3>(FieldApproximationBase base,
331 const int gg, const int bb) {
332 double *t_diff_n_ptr = &getDiffN(base)(gg, 9 * bb);
334 t_diff_n_ptr, &t_diff_n_ptr[HVEC0_1], &t_diff_n_ptr[HVEC0_2],
335 &t_diff_n_ptr[HVEC1_0], &t_diff_n_ptr[HVEC1_1], &t_diff_n_ptr[HVEC1_2],
336 &t_diff_n_ptr[HVEC2_0], &t_diff_n_ptr[HVEC2_1], &t_diff_n_ptr[HVEC2_2]);
337}
338
339template <>
341EntitiesFieldData::EntData::getFTensor2DiffN<3, 2>(
343 double *t_diff_n_ptr = &*getDiffN(base).data().begin();
345 t_diff_n_ptr, &t_diff_n_ptr[HVEC0_1], &t_diff_n_ptr[HVEC1_0],
346 &t_diff_n_ptr[HVEC1_1], &t_diff_n_ptr[HVEC2_0], &t_diff_n_ptr[HVEC2_1]);
347}
348
349template <>
351EntitiesFieldData::EntData::getFTensor2DiffN<3, 2>(FieldApproximationBase base,
352 const int gg, const int bb) {
353 double *t_diff_n_ptr = &getDiffN(base)(gg, 6 * bb);
355 t_diff_n_ptr, &t_diff_n_ptr[HVEC0_1], &t_diff_n_ptr[HVEC1_0],
356 &t_diff_n_ptr[HVEC1_1], &t_diff_n_ptr[HVEC2_0], &t_diff_n_ptr[HVEC2_1]);
357}
358
359template <>
362 double *ptr = &(getN(base, BaseDerivatives::SecondDerivative))(0, 0);
364
365 &ptr[2 * HVEC0_0 + 0], &ptr[2 * HVEC0_0 + 1], &ptr[2 * HVEC0_1 + 0],
366 &ptr[2 * HVEC0_1 + 1],
367
368 &ptr[2 * HVEC1_0 + 0], &ptr[2 * HVEC1_0 + 1], &ptr[2 * HVEC1_1 + 0],
369 &ptr[2 * HVEC1_1 + 1],
370
371 &ptr[2 * HVEC2_0 + 0], &ptr[2 * HVEC2_0 + 1], &ptr[2 * HVEC2_1 + 0],
372 &ptr[2 * HVEC2_1 + 1]
373
374 };
375}
376
377template <int Tensor_Dim0, int Tensor_Dim1, int Tensor_Dim2>
380 Tensor_Dim0, Tensor_Dim1, Tensor_Dim2>
382 std::stringstream s;
383 s << "Template for tensor dimension " << Tensor_Dim0 << "x" << Tensor_Dim1
384 << "x" << Tensor_Dim2 << " not implemented";
385 THROW_MESSAGE(s.str());
387}
388
389template <int Tensor_Dim0, int Tensor_Dim1, int Tensor_Dim2>
391 Tensor_Dim0, Tensor_Dim1, Tensor_Dim2>
393 const int gg, const int bb) {
394 std::stringstream s;
395 s << "Template for tensor dimension " << Tensor_Dim0 << "x" << Tensor_Dim1
396 << " not implemented";
397 THROW_MESSAGE(s.str());
399}
400
401template <>
404 double *ptr = &*getDiffN(base).data().begin();
405 return getFTensor3FromPtr<3, 3, 3>(ptr);
406};
407
408template <>
411 const int gg, const int bb) {
412 double *ptr = &getDiffN(base)(gg, 27 * bb);
413 return getFTensor3FromPtr<3, 3, 3>(ptr);
414};
415
416/**@}*/
417
418/** \name Bernstein-Bezier base only functions */
419
420/**@{*/
421
422boost::shared_ptr<MatrixInt> &
424 const std::string &field_name) {
425 return bbAlphaIndices[field_name];
426}
427
428boost::shared_ptr<MatrixDouble> &
430 return bbN[field_name];
431}
432
433/**
434 * Get shared pointer to BB base base functions
435 */
436const boost::shared_ptr<MatrixDouble> &
438 const std::string &field_name) const {
439 return bbN.at(field_name);
440}
441
442/**
443 * Get shared pointer to BB derivatives of base base functions
444 */
445boost::shared_ptr<MatrixDouble> &
447 return bbDiffN[field_name];
448}
449
450/**
451 * Get shared pointer to derivatives of BB base base functions
452 */
453const boost::shared_ptr<MatrixDouble> &
455 const std::string &field_name) const {
456 return bbDiffN.at(field_name);
457}
458
459std::map<std::string, boost::shared_ptr<MatrixInt>> &
461 return bbAlphaIndices;
462}
463
464std::map<std::string, boost::shared_ptr<MatrixDouble>> &
468
469std::map<std::string, boost::shared_ptr<MatrixDouble>> &
471 return bbDiffN;
472}
473
474boost::shared_ptr<MatrixInt> &
476 return bbAlphaIndicesByOrder[o];
477}
478
479boost::shared_ptr<MatrixDouble> &
481 return bbNByOrder[o];
482}
483
484boost::shared_ptr<MatrixDouble> &
486 return bbDiffNByOrder[o];
487}
488
489std::array<boost::shared_ptr<MatrixInt>,
492 return bbAlphaIndicesByOrder;
493}
494
495std::array<boost::shared_ptr<MatrixDouble>,
500
501std::array<boost::shared_ptr<MatrixDouble>,
504 return bbDiffNByOrder;
505}
506
507boost::shared_ptr<MatrixInt> &
509 const std::string &field_name) {
510 return entDataPtr->getBBAlphaIndicesSharedPtr(field_name);
511}
512
513boost::shared_ptr<MatrixDouble> &
515 const std::string &field_name) {
516 return entDataPtr->getBBNSharedPtr(field_name);
517}
518
519const boost::shared_ptr<MatrixDouble> &
521 const std::string &field_name) const {
522 return entDataPtr->getBBNSharedPtr(field_name);
523}
524
525/**
526 * Get shared pointer to BB derivatives of base base functions
527 */
528boost::shared_ptr<MatrixDouble> &
530 const std::string &field_name) {
531 return entDataPtr->getBBDiffNSharedPtr(field_name);
532}
533
534/**
535 * Get shared pointer to derivatives of BB base base functions
536 */
537const boost::shared_ptr<MatrixDouble> &
539 const std::string &field_name) const {
540 return entDataPtr->getBBDiffNSharedPtr(field_name);
541}
542
543/**@}*/
544
546 return entDataBitRefLevel;
547}
548
549std::vector<BitRefLevel> &
551 return entDataPtr->getEntDataBitRefLevel();
552}
553
554
555
556
557} // namespace MoFEM
std::string type
static const double eps
T data[Tensor_Dim0][Tensor_Dim1]
T data[Tensor_Dim0][Tensor_Dim1][Tensor_Dim2]
FieldApproximationBase
approximation base
Definition definitions.h:58
@ LASTBASE
Definition definitions.h:69
@ NOBASE
Definition definitions.h:59
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
@ NOSPACE
Definition definitions.h:83
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
@ HVEC1_1
@ HVEC0_1
@ HVEC1_0
@ HVEC2_1
@ HVEC1_2
@ HVEC2_2
@ HVEC2_0
@ HVEC0_2
@ HVEC0_0
#define CHKERR
Inline error check.
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
#define THROW_MESSAGE(msg)
Throw MoFEM exception.
const double c
speed of light (cm/ns)
PetscErrorCode MoFEMErrorCode
MoFEM/PETSc error code.
UBlasMatrix< double > MatrixDouble
Definition Types.hpp:77
implementation of Data Operators for Forces and Sources
Definition Common.hpp:10
static void constructor_derived_data(DerivedEntitiesFieldData *derived_data, const boost::shared_ptr< EntitiesFieldData > &data_ptr)
static void constructor_data(EntitiesFieldData *data, const EntityType type)
FTensor::Tensor3< FTensor::PackPtr< double *, 27 >, 3, 3, 3 > getFTensor3FromPtr< 3, 3, 3 >(double *ptr)
constexpr double t
plate stiffness
Definition plate.cpp:58
constexpr auto field_name
const int N
Definition speed_test.cpp:3
Derived data on single entity (This is passed as argument to DataOperator::doWork)
boost::shared_ptr< MatrixDouble > & getBBNSharedPtr(const std::string &field_name)
MoFEMErrorCode baseSwap(const std::string &field_name, const FieldApproximationBase base)
Used by Bernstein base to keep temporary pointer.
std::vector< BitRefLevel > & getEntDataBitRefLevel()
Get entity bit reference level.
int getSense() const
Get entity sense for conforming approximation fields.
boost::shared_ptr< MatrixInt > & getBBAlphaIndicesSharedPtr(const std::string &field_name)
boost::shared_ptr< MatrixDouble > & getBBDiffNSharedPtr(const std::string &field_name)
boost::shared_ptr< MatrixDouble > & getDiffNSharedPtr(const FieldApproximationBase base)
Get shared pointer to derivatives of base functions.
DerivedEntData(const boost::shared_ptr< EntitiesFieldData::EntData > &ent_data_ptr)
boost::shared_ptr< MatrixDouble > & getNSharedPtr(const FieldApproximationBase base, const BaseDerivatives derivative)
Get shared pointer to base functions with derivatives.
this class derives data from other data structure
MoFEMErrorCode setElementType(const EntityType type)
Set element type for derived data.
const boost::shared_ptr< EntitiesFieldData > dataPtr
DerivedEntitiesFieldData(const boost::shared_ptr< EntitiesFieldData > &data_ptr)
Construct DerivedEntitiesFieldData from existing EntitiesFieldData.
Data on single entity (This is passed as argument to DataOperator::doWork)
virtual std::array< boost::shared_ptr< MatrixDouble >, MaxBernsteinBezierOrder > & getBBDiffNByOrderArray()
virtual std::array< boost::shared_ptr< MatrixDouble >, MaxBernsteinBezierOrder > & getBBNByOrderArray()
VectorDouble fieldData
Field data on entity.
ApproximationOrder getOrder() const
Get approximation order.
VectorInt localIndices
Local indices on entity.
virtual std::array< boost::shared_ptr< MatrixInt >, MaxBernsteinBezierOrder > & getBBAlphaIndicesByOrderArray()
virtual std::map< std::string, boost::shared_ptr< MatrixInt > > & getBBAlphaIndicesMap()
static constexpr size_t MaxBernsteinBezierOrder
VectorInt iNdices
Global indices on entity.
virtual boost::shared_ptr< MatrixDouble > & getNSharedPtr(const FieldApproximationBase base, const BaseDerivatives derivative)
Get shared pointer to base functions with derivatives.
virtual boost::shared_ptr< MatrixInt > & getBBAlphaIndicesSharedPtr(const std::string &field_name)
const VectorDouble & getFieldData() const
Get DOF values on entity.
virtual boost::shared_ptr< MatrixDouble > & getBBDiffNByOrderSharedPtr(const size_t o)
get BB base derivative by order
virtual std::map< std::string, boost::shared_ptr< MatrixDouble > > & getBBNMap()
get hash map of base function for BB base, key is a field name
virtual MoFEMErrorCode baseSwap(const std::string &field_name, const FieldApproximationBase base)
Swap bases functions.
const VectorInt & getLocalIndices() const
Get local indices of degrees of freedom on entity.
FTensor::Tensor3< FTensor::PackPtr< double *, Tensor_Dim0 *Tensor_Dim1 *Tensor_Dim2 >, Tensor_Dim0, Tensor_Dim1, Tensor_Dim2 > getFTensor3DiffN()
Get derivatives of base functions for tonsorial Hdiv space.
virtual std::map< std::string, boost::shared_ptr< MatrixDouble > > & getBBDiffNMap()
get hash map of derivatives base function for BB base, key is a field name
virtual std::vector< BitRefLevel > & getEntDataBitRefLevel()
Get entity bit reference level.
virtual int getSense() const
Get entity sense for conforming approximation fields.
VectorFieldEntities fieldEntities
Field entities.
virtual boost::shared_ptr< MatrixInt > & getBBAlphaIndicesByOrderSharedPtr(const size_t o)
get ALpha indices for BB base by order
FTensor::Tensor3< FTensor::PackPtr< double *, Tensor_Dim0 *Tensor_Dim1 *Tensor_Dim2 >, Tensor_Dim0, Tensor_Dim1, Tensor_Dim2 > getFTensor3Diff2N()
Get second derivatives of base functions for Hvec space.
virtual boost::shared_ptr< MatrixDouble > & getBBNSharedPtr(const std::string &field_name)
std::array< std::array< boost::shared_ptr< MatrixDouble >, LASTBASE >, LastDerivative > baseFunctionsAndBaseDerivatives
FTensor::Tensor2< FTensor::PackPtr< double *, Tensor_Dim0 *Tensor_Dim1 >, Tensor_Dim0, Tensor_Dim1 > getFTensor2DiffN()
Get derivatives of base functions for Hdiv space.
virtual boost::shared_ptr< MatrixDouble > & getDiffNSharedPtr(const FieldApproximationBase base)
Get shared pointer to derivatives of base functions.
virtual boost::shared_ptr< MatrixDouble > & getBBNByOrderSharedPtr(const size_t o)
get BB base by order
const VectorInt & getIndices() const
Get global indices of degrees of freedom on entity.
EntData(const bool allocate_base_matrices=true)
Construct EntData object.
FieldApproximationBase bAse
Field approximation base.
virtual boost::shared_ptr< MatrixDouble > & getBBDiffNSharedPtr(const std::string &field_name)
data structure for finite element entity
friend std::ostream & operator<<(std::ostream &os, const EntitiesFieldData &e)
MoFEMErrorCode resetFieldDependentData()
Reset data associated with particular field name.
std::array< boost::ptr_vector< EntData >, MBMAXTYPE > dataOnEntities
virtual MoFEMErrorCode baseSwap(const std::string &field_name, const FieldApproximationBase base)
Swap approximation base.
virtual MoFEMErrorCode setElementType(const EntityType type)
Set element type and initialize data structures.