v0.14.0
FieldMultiIndices.cpp
Go to the documentation of this file.
1 /** \file FieldMultiIndices.cpp
2  * \brief Multi-index containers for fields
3  */
4 
5 namespace MoFEM {
6 
7 constexpr int Field::maxBrokenDofsOrder;
8 
9 // Not partitioned
10 const bool Idx_mi_tag::IamNotPartitioned = true;
11 
12 // This tag is used for partitioned problems
15 
16 // fields
18  : moab(moab), meshSet(meshset), tagId(NULL), tagSpaceData(NULL),
19  tagFieldContinuityData(NULL), tagNbCoeffData(NULL), tagName(NULL),
20  tagNameSize(0) {
21 
22  auto get_tag_data_ptr = [&](const auto name, auto &tag_data) {
24  Tag th;
25  CHKERR moab.tag_get_handle(name, th);
26  CHKERR moab.tag_get_by_ptr(th, &meshset, 1, (const void **)&tag_data);
28  };
29 
30  // id
31  ierr = get_tag_data_ptr("_FieldId", tagId);
32  CHKERRABORT(PETSC_COMM_SELF, ierr);
33  // space
34  ierr = get_tag_data_ptr("_FieldSpace", tagSpaceData);
35  CHKERRABORT(PETSC_COMM_SELF, ierr);
36  // continuity
37  ierr = get_tag_data_ptr("_FieldContinuity", tagFieldContinuityData);
38  CHKERRABORT(PETSC_COMM_SELF, ierr);
39 
40  // approx. base
41  ierr = get_tag_data_ptr("_FieldBase", tagBaseData);
42  CHKERRABORT(PETSC_COMM_SELF, ierr);
43 
44  // name
45  Tag th_field_name;
46  CHKERR moab.tag_get_handle("_FieldName", th_field_name);
47  CHKERR moab.tag_get_by_ptr(th_field_name, &meshSet, 1,
48  (const void **)&tagName, &tagNameSize);
49  // name prefix
50  Tag th_field_name_data_name_prefix;
51  CHKERR moab.tag_get_handle("_FieldName_DataNamePrefix",
52  th_field_name_data_name_prefix);
53  CHKERR moab.tag_get_by_ptr(th_field_name_data_name_prefix, &meshSet, 1,
54  (const void **)&tagNamePrefixData,
56  std::string name_data_prefix((char *)tagNamePrefixData, tagNamePrefixSize);
57 
58  // rank
59  std::string Tag_rank_name = "_Field_Rank_" + getName();
60  CHKERR moab.tag_get_handle(Tag_rank_name.c_str(), th_FieldRank);
61  CHKERR moab.tag_get_by_ptr(th_FieldRank, &meshSet, 1,
62  (const void **)&tagNbCoeffData);
63 
64  auto get_all_tags = [&]() {
66  // order
67  ApproximationOrder def_approx_order = -1;
68  std::string tag_approximation_order_name = "_App_Order_" + getName();
69  rval = moab.tag_get_handle(tag_approximation_order_name.c_str(), 1,
70  MB_TYPE_INTEGER, th_AppOrder,
71  MB_TAG_CREAT | MB_TAG_SPARSE, &def_approx_order);
72  if (rval == MB_ALREADY_ALLOCATED)
73  rval = MB_SUCCESS;
75 
76  // data
77  std::string tag_data_name = name_data_prefix + getName();
78  const int def_len = 0;
79  rval = moab.tag_get_handle(
80  tag_data_name.c_str(), def_len, MB_TYPE_DOUBLE, th_FieldData,
81  MB_TAG_CREAT | MB_TAG_VARLEN | MB_TAG_SPARSE, NULL);
82  if (rval == MB_ALREADY_ALLOCATED)
83  rval = MB_SUCCESS;
85 
86  std::string tag_data_name_verts = name_data_prefix + getName() + "_V";
87  rval = moab.tag_get_handle(tag_data_name_verts.c_str(), th_FieldDataVerts);
88  if (rval == MB_SUCCESS)
90  else {
91  // Since vertex tag is not it mesh that tag is not dense, it is sparse,
92  // sinc it is set to all vertices on the mesh. Is unlikely that mesh has
93  // no vertices, then above assumption does not hold.
94  tagFieldDataVertsType = MB_TAG_SPARSE;
95  VectorDouble def_vert_data(*tagNbCoeffData);
96  def_vert_data.clear();
97  rval = moab.tag_get_handle(tag_data_name_verts.c_str(), *tagNbCoeffData,
98  MB_TYPE_DOUBLE, th_FieldDataVerts,
99  MB_TAG_CREAT | tagFieldDataVertsType,
100  &*def_vert_data.begin());
101  if (rval == MB_ALREADY_ALLOCATED)
102  rval = MB_SUCCESS;
103  MOAB_THROW(rval);
104  }
105 
107  };
108 
109  auto get_all_tags_deprecated = [&]() {
111  // order
112  ApproximationOrder def_approx_order = -1;
113  std::string tag_approximation_order_name = "_App_Order_" + getName();
114  rval = moab.tag_get_handle(tag_approximation_order_name.c_str(), 1,
115  MB_TYPE_INTEGER, th_AppOrder,
116  MB_TAG_CREAT | MB_TAG_SPARSE, &def_approx_order);
117  if (rval == MB_ALREADY_ALLOCATED)
118  rval = MB_SUCCESS;
119  MOAB_THROW(rval);
120 
121  // data
122  std::string tag_data_name = name_data_prefix + getName();
123  const int def_len = 0;
124  rval = moab.tag_get_handle(
125  tag_data_name.c_str(), def_len, MB_TYPE_DOUBLE, th_FieldData,
126  MB_TAG_CREAT | MB_TAG_VARLEN | MB_TAG_SPARSE, NULL);
127  if (rval == MB_ALREADY_ALLOCATED)
128  rval = MB_SUCCESS;
129  MOAB_THROW(rval);
130 
131  std::string tag_data_name_verts = name_data_prefix + getName() + "V";
132  rval = moab.tag_get_handle(tag_data_name_verts.c_str(), th_FieldDataVerts);
133  if (rval == MB_SUCCESS)
135  else {
136  // Since vertex tag is not it mesh that tag is not dense, it is sparse,
137  // sinc it is set to all vertices on the mesh. Is unlikely that mesh has
138  // no vertices, then above assumption does not hold.
139  tagFieldDataVertsType = MB_TAG_SPARSE;
140  VectorDouble def_vert_data(*tagNbCoeffData);
141  def_vert_data.clear();
142  rval = moab.tag_get_handle(tag_data_name_verts.c_str(), *tagNbCoeffData,
143  MB_TYPE_DOUBLE, th_FieldDataVerts,
144  MB_TAG_CREAT | tagFieldDataVertsType,
145  &*def_vert_data.begin());
146  if (rval == MB_ALREADY_ALLOCATED)
147  rval = MB_SUCCESS;
148  MOAB_THROW(rval);
149  }
150 
152  };
153 
154  Version file_ver;
156  CHK_THROW_MESSAGE(ierr, "Not known file version");
157  if (file_ver.majorVersion >= 0 && file_ver.minorVersion >= 12 &&
158  file_ver.buildVersion >= 1) {
159  ierr = get_all_tags();
160  CHKERRABORT(PETSC_COMM_SELF, ierr);
161  } else {
162  ierr = get_all_tags_deprecated();
163  CHKERRABORT(PETSC_COMM_SELF, ierr);
164  }
165 
167 
168  auto reset_entity_order_table = [&]() {
169  for (int tt = 0; tt != MBMAXTYPE; ++tt)
170  forderTable[tt] = NULL;
171  };
172 
173  auto set_continuous_entity_order_table = [&]() {
174  switch (*tagBaseData) {
177  switch (*tagSpaceData) {
178  case H1:
179  forderTable[MBVERTEX] = [](int P) -> int { return (P > 0) ? 1 : 0; };
180  forderTable[MBEDGE] = [](int P) -> int { return NBEDGE_H1(P); };
181  forderTable[MBTRI] = [](int P) -> int { return NBFACETRI_H1(P); };
182  forderTable[MBQUAD] = [](int P) -> int { return NBFACEQUAD_H1(P); };
183  forderTable[MBTET] = [](int P) -> int { return NBVOLUMETET_H1(P); };
184  forderTable[MBHEX] = [](int P) -> int { return NBVOLUMEHEX_H1(P); };
185  forderTable[MBPRISM] = [](int P) -> int { return NBVOLUMEPRISM_H1(P); };
186  break;
187  case HCURL:
188  forderTable[MBVERTEX] = [](int P) -> int {
189  (void)P;
190  return 0;
191  };
192  forderTable[MBEDGE] = [](int P) -> int {
193  return NBEDGE_AINSWORTH_HCURL(P);
194  };
195  forderTable[MBTRI] = [](int P) -> int {
197  };
198  forderTable[MBTET] = [](int P) -> int {
200  };
201  break;
202  case HDIV:
203  forderTable[MBVERTEX] = [](int P) -> int {
204  (void)P;
205  return 0;
206  };
207  forderTable[MBEDGE] = [](int P) -> int {
208  (void)P;
209  return NBEDGE_HDIV(P);
210  };
211  forderTable[MBTRI] = [](int P) -> int {
216  };
217  forderTable[MBTET] = [](int P) -> int {
224  };
225  break;
226  case L2:
227  forderTable[MBVERTEX] = [](int P) -> int {
228  (void)P;
229  return 1;
230  };
231  forderTable[MBEDGE] = [](int P) -> int { return NBEDGE_L2(P); };
232  forderTable[MBTRI] = [](int P) -> int { return NBFACETRI_L2(P); };
233  forderTable[MBQUAD] = [](int P) -> int { return NBFACEQUAD_L2(P); };
234  forderTable[MBTET] = [](int P) -> int { return NBVOLUMETET_L2(P); };
235  forderTable[MBHEX] = [](int P) -> int { return NBVOLUMEHEX_L2(P); };
236  break;
237  default:
238  THROW_MESSAGE("unknown approximation space");
239  }
240  break;
242  switch (*tagSpaceData) {
243  case H1:
244  forderTable[MBVERTEX] = [](int P) -> int { return (P > 0) ? 1 : 0; };
245  forderTable[MBEDGE] = [](int P) -> int { return NBEDGE_H1(P); };
246  forderTable[MBTRI] = [](int P) -> int { return NBFACETRI_H1(P); };
247  forderTable[MBQUAD] = [](int P) -> int { return NBFACEQUAD_H1(P); };
248  forderTable[MBTET] = [](int P) -> int { return NBVOLUMETET_H1(P); };
249  forderTable[MBPRISM] = [](int P) -> int { return NBVOLUMEPRISM_H1(P); };
250  break;
251  case L2:
252  forderTable[MBVERTEX] = [](int P) -> int {
253  (void)P;
254  return 1;
255  };
256  forderTable[MBEDGE] = [](int P) -> int { return NBEDGE_L2(P); };
257  forderTable[MBTRI] = [](int P) -> int { return NBFACETRI_L2(P); };
258  forderTable[MBQUAD] = [](int P) -> int { return NBFACEQUAD_L2(P); };
259  forderTable[MBTET] = [](int P) -> int { return NBVOLUMETET_L2(P); };
260  forderTable[MBHEX] = [](int P) -> int { return NBVOLUMEHEX_L2(P); };
261  break;
262  default:
263  THROW_MESSAGE("unknown approximation space or not yet implemented");
264  }
265  break;
267  switch (*tagSpaceData) {
268  case H1:
269  forderTable[MBVERTEX] = [](int P) -> int { return (P > 0) ? 1 : 0; };
270  forderTable[MBEDGE] = [](int P) -> int { return NBEDGE_H1(P); };
271  forderTable[MBTRI] = [](int P) -> int { return NBFACETRI_H1(P); };
272  forderTable[MBQUAD] = [](int P) -> int { return NBFACEQUAD_H1(P); };
273  forderTable[MBTET] = [](int P) -> int { return NBVOLUMETET_H1(P); };
274  forderTable[MBHEX] = [](int P) -> int { return NBVOLUMEHEX_H1(P); };
275  forderTable[MBPRISM] = [](int P) -> int { return NBVOLUMEPRISM_H1(P); };
276  break;
277  case HCURL:
278  forderTable[MBVERTEX] = [](int P) -> int {
279  (void)P;
280  return 0;
281  };
282  forderTable[MBEDGE] = [](int P) -> int {
283  return NBEDGE_DEMKOWICZ_HCURL(P);
284  };
285  forderTable[MBTRI] = [](int P) -> int {
287  };
288  forderTable[MBQUAD] = [](int P) -> int {
290  };
291  forderTable[MBTET] = [](int P) -> int {
293  };
294  forderTable[MBHEX] = [](int P) -> int {
296  };
297  break;
298  case HDIV:
299  forderTable[MBVERTEX] = [](int P) -> int {
300  (void)P;
301  return 0;
302  };
303  forderTable[MBEDGE] = [](int P) -> int {
304  (void)P;
305  return 0;
306  };
307  forderTable[MBTRI] = [](int P) -> int {
308  return NBFACETRI_DEMKOWICZ_HDIV(P);
309  };
310  forderTable[MBQUAD] = [](int P) -> int {
312  };
313  forderTable[MBTET] = [](int P) -> int {
315  };
316  forderTable[MBHEX] = [](int P) -> int {
318  };
319  break;
320  case L2:
321  forderTable[MBVERTEX] = [](int P) -> int {
322  (void)P;
323  return 1;
324  };
325  forderTable[MBEDGE] = [](int P) -> int { return NBEDGE_L2(P); };
326  forderTable[MBTRI] = [](int P) -> int { return NBFACETRI_L2(P); };
327  forderTable[MBQUAD] = [](int P) -> int { return NBFACEQUAD_L2(P); };
328  forderTable[MBTET] = [](int P) -> int { return NBVOLUMETET_L2(P); };
329  forderTable[MBHEX] = [](int P) -> int { return NBVOLUMEHEX_L2(P); };
330  break;
331  default:
332  THROW_MESSAGE("unknown approximation space or not yet implemented");
333  }
334  break;
335  case USER_BASE:
336  for (int ee = 0; ee < MBMAXTYPE; ee++) {
337  forderTable[ee] = [](int P) -> int {
338  (void)P;
339  return 0;
340  };
341  }
342  break;
343  default:
344  if (*tagSpaceData != NOFIELD) {
345  THROW_MESSAGE("unknown approximation base");
346  } else {
347  for (EntityType t = MBVERTEX; t < MBMAXTYPE; t++)
348  forderTable[t] = [](int P) -> int {
349  (void)P;
350  return 1;
351  };
352  }
353  }
354  };
355 
356  auto set_discontinuous_entity_order_table = [&]() {
357  switch (*tagBaseData) {
360  switch (*tagSpaceData) {
361  case HCURL:
362  forderTable[MBVERTEX] = [](int P) -> int {
363  (void)P;
364  return 0;
365  };
366  forderTable[MBEDGE] = [](int P) -> int {
367  (void)P;
368  return 0;
369  };
370  forderTable[MBTRI] = [](int P) -> int {
372  };
373  forderTable[MBTET] = [](int P) -> int {
374  return 6 * NBEDGE_AINSWORTH_HCURL(P) +
377  };
378  break;
379  case HDIV:
380  forderTable[MBVERTEX] = [](int P) -> int {
381  (void)P;
382  return 0;
383  };
384  forderTable[MBEDGE] = [](int P) -> int {
385  (void)P;
386  return 0;
387  };
388  forderTable[MBTRI] = [](int P) -> int {
389  (void)P;
390  return 0;
391  };
392  forderTable[MBTET] = [](int P) -> int {
393  return
394 
395  4 * (
396 
401 
402  ) +
403 
410  };
411  break;
412  default:
413  THROW_MESSAGE("unknown approximation space or not implemented");
414  }
415  break;
417  THROW_MESSAGE("unknown approximation space or not yet implemented");
418  break;
420  switch (*tagSpaceData) {
421  case HCURL:
422  forderTable[MBVERTEX] = [](int P) -> int {
423  (void)P;
424  return 0;
425  };
426  forderTable[MBEDGE] = [](int P) -> int {
427  (void)P;
428  return 0;
429  };
430  forderTable[MBTRI] = [](int P) -> int {
432  };
433  forderTable[MBQUAD] = [](int P) -> int {
435  };
436  forderTable[MBTET] = [](int P) -> int {
437  return 6 * NBEDGE_DEMKOWICZ_HCURL(P) +
440  };
441  forderTable[MBHEX] = [](int P) -> int {
442  return 12 * NBEDGE_DEMKOWICZ_HCURL(P) +
445  };
446  break;
447  case HDIV:
448  forderTable[MBVERTEX] = [](int P) -> int {
449  (void)P;
450  return 0;
451  };
452  forderTable[MBEDGE] = [](int P) -> int {
453  (void)P;
454  return 0;
455  };
456  forderTable[MBTRI] = [](int P) -> int {
457  (void)P;
458  return 0;
459  };
460  forderTable[MBQUAD] = [](int P) -> int {
461  (void)P;
462  return 0;
463  };
464  forderTable[MBTET] = [](int P) -> int {
465  return 4 * NBFACETRI_DEMKOWICZ_HDIV(P) +
467  };
468  forderTable[MBHEX] = [](int P) -> int {
469  return 6 * NBFACEQUAD_DEMKOWICZ_HDIV(P) +
471  };
472  break;
473  default:
474  THROW_MESSAGE("unknown approximation space or not yet implemented");
475  }
476  break;
477  case USER_BASE:
478  for (int ee = 0; ee < MBMAXTYPE; ee++) {
479  forderTable[ee] = [](int P) -> int {
480  (void)P;
481  return 0;
482  };
483  }
484  break;
485  default:
486  if (*tagSpaceData != NOFIELD) {
487  THROW_MESSAGE("unknown approximation base");
488  } else {
489  for (EntityType t = MBVERTEX; t < MBMAXTYPE; t++)
490  forderTable[t] = [](int P) -> int {
491  (void)P;
492  return 1;
493  };
494  }
495  }
496  };
497 
498  reset_entity_order_table();
499  switch (*tagFieldContinuityData) {
500  case CONTINUOUS:
501  set_continuous_entity_order_table();
502  break;
503  case DISCONTINUOUS:
504  set_discontinuous_entity_order_table();
505  break;
506  default:
507  THROW_MESSAGE("unknown field continuity");
508  break;
509  }
511  CHKERRABORT(PETSC_COMM_SELF, ierr);
512 };
513 
516 
517  for (auto t = MBVERTEX; t != MBMAXTYPE; ++t) {
518 
519  int DD = 0;
520  int nb_last_order_dofs = 0;
521  const int rank = (*tagNbCoeffData);
522  if (forderTable[t]) {
523 
524  for (int oo = 0; oo < MAX_DOFS_ON_ENTITY; ++oo) {
525 
526  const int nb_order_dofs = forderTable[t](oo);
527  const int diff_oo = nb_order_dofs - nb_last_order_dofs;
528  if (diff_oo >= 0) {
529 
530  if ((DD + rank * diff_oo) < MAX_DOFS_ON_ENTITY)
531  for (int dd = 0; dd < diff_oo; ++dd)
532  for (int rr = 0; rr != rank; ++rr, ++DD)
533  dofOrderMap[t][DD] = oo;
534  else
535  break;
536 
537  nb_last_order_dofs = nb_order_dofs;
538 
539  } else {
540  break;
541  }
542  }
543  }
544 
545  std::fill(&dofOrderMap[t][DD], dofOrderMap[t].end(), -1);
546  }
547 
549 }
550 
551 std::ostream &operator<<(std::ostream &os, const Field &e) {
552  os << e.getNameRef() << " field_id " << e.getId().to_ulong() << " space "
553  << e.getSpaceName() << " field continuity " << e.getContinuityName()
554  << " approximation base " << e.getApproxBaseName() << " nb coefficients "
555  << e.getNbOfCoeffs() << " meshset " << e.meshSet;
556  return os;
557 }
558 
559 // FieldEntityEntFiniteElementAdjacencyMap
562  const boost::shared_ptr<FieldEntity> &ent_field_ptr,
563  const boost::shared_ptr<EntFiniteElement> &ent_fe_ptr)
564  : byWhat(0), entFieldPtr(ent_field_ptr), entFePtr(ent_fe_ptr) {}
565 
566 std::ostream &operator<<(std::ostream &os,
568  os << "byWhat " << std::bitset<3>(e.byWhat) << " " << *e.entFieldPtr
569  << std::endl
570  << *e.entFePtr->getFiniteElementPtr();
571  return os;
572 }
573 
574 } // namespace MoFEM
MoFEM::Field::getSpaceName
auto getSpaceName() const
Get field approximation space.
Definition: FieldMultiIndices.hpp:157
MoFEM::FieldEntityEntFiniteElementAdjacencyMap::byWhat
unsigned int byWhat
see options ByWhat
Definition: AdjacencyMultiIndices.hpp:19
MoFEM::operator<<
std::ostream & operator<<(std::ostream &os, const EntitiesFieldData::EntData &e)
Definition: EntitiesFieldData.cpp:240
MoFEM::PetscLocalIdx_mi_tag::IamNotPartitioned
static const bool IamNotPartitioned
Definition: TagMultiIndices.hpp:46
MoFEM::Field::tagFieldDataVertsType
TagType tagFieldDataVertsType
Definition: FieldMultiIndices.hpp:75
MoFEM::Field::getNbOfCoeffs
FieldCoefficientsNumber getNbOfCoeffs() const
Get number of field coefficients.
Definition: FieldMultiIndices.hpp:202
H1
@ H1
continuous field
Definition: definitions.h:85
NBVOLUMEHEX_DEMKOWICZ_HCURL
#define NBVOLUMEHEX_DEMKOWICZ_HCURL(P)
Definition: h1_hdiv_hcurl_l2.h:124
NBEDGE_H1
#define NBEDGE_H1(P)
Number of base function on edge for H1 space.
Definition: h1_hdiv_hcurl_l2.h:55
MoFEM::Version::majorVersion
int majorVersion
Definition: UnknownInterface.hpp:13
EntityHandle
MoFEM::Field::moab
moab::Interface & moab
Definition: FieldMultiIndices.hpp:71
MoFEM::AinsworthOrderHooks::broken_nbvolumetet_volume_hdiv
static boost::function< int(int)> broken_nbvolumetet_volume_hdiv
Definition: Hdiv.hpp:29
NBVOLUMETET_DEMKOWICZ_HCURL
#define NBVOLUMETET_DEMKOWICZ_HCURL(P)
Definition: h1_hdiv_hcurl_l2.h:110
CHK_THROW_MESSAGE
#define CHK_THROW_MESSAGE(err, msg)
Check and throw MoFEM exception.
Definition: definitions.h:609
MoFEM::Field::maxBrokenDofsOrder
static constexpr int maxBrokenDofsOrder
max number of broken dofs
Definition: FieldMultiIndices.hpp:282
L2
@ L2
field with C-1 continuity
Definition: definitions.h:88
MoFEM::Field::tagSpaceData
FieldSpace * tagSpaceData
tag keeps field space
Definition: FieldMultiIndices.hpp:82
NBFACETRI_AINSWORTH_EDGE_HDIV
#define NBFACETRI_AINSWORTH_EDGE_HDIV(P)
Definition: h1_hdiv_hcurl_l2.h:130
MoFEM::AinsworthOrderHooks::broken_nbvolumetet_face_hdiv
static boost::function< int(int)> broken_nbvolumetet_face_hdiv
Definition: Hdiv.hpp:28
MoFEM::Field::rebuildDofsOrderMap
MoFEMErrorCode rebuildDofsOrderMap()
Definition: FieldMultiIndices.cpp:514
MoFEM::Field::tagFieldContinuityData
FieldContinuity * tagFieldContinuityData
tag keeps field continuity
Definition: FieldMultiIndices.hpp:83
MoFEM::Exceptions::MoFEMErrorCode
PetscErrorCode MoFEMErrorCode
MoFEM/PETSc error code.
Definition: Exceptions.hpp:56
MoFEM::th
Tag th
Definition: Projection10NodeCoordsOnField.cpp:122
NBVOLUMETET_AINSWORTH_FACE_HDIV
#define NBVOLUMETET_AINSWORTH_FACE_HDIV(P)
Definition: h1_hdiv_hcurl_l2.h:134
MoFEM::Field::th_FieldData
Tag th_FieldData
Tag storing field values on entity in the field.
Definition: FieldMultiIndices.hpp:77
MoFEM::UnknownInterface::getFileVersion
static MoFEMErrorCode getFileVersion(moab::Interface &moab, Version &version)
Get database major version.
Definition: UnknownInterface.cpp:16
NBVOLUMETET_H1
#define NBVOLUMETET_H1(P)
Number of base functions on tetrahedron for H1 space.
Definition: h1_hdiv_hcurl_l2.h:75
MOAB_THROW
#define MOAB_THROW(err)
Check error code of MoAB function and throw MoFEM exception.
Definition: definitions.h:554
MoFEM::Field::getName
std::string getName() const
Get field name.
Definition: FieldMultiIndices.hpp:143
NBVOLUMETET_L2
#define NBVOLUMETET_L2(P)
Number of base functions on tetrahedron for L2 space.
Definition: h1_hdiv_hcurl_l2.h:27
NBFACEQUAD_DEMKOWICZ_HCURL
#define NBFACEQUAD_DEMKOWICZ_HCURL(P)
Definition: h1_hdiv_hcurl_l2.h:118
MoFEM::Field::th_FieldRank
Tag th_FieldRank
Definition: FieldMultiIndices.hpp:79
THROW_MESSAGE
#define THROW_MESSAGE(msg)
Throw MoFEM exception.
Definition: definitions.h:574
MoFEM::Field::getApproxBaseName
auto getApproxBaseName() const
Get approximation base.
Definition: FieldMultiIndices.hpp:184
MoFEM::Field
Provide data structure for (tensor) field approximation.
Definition: FieldMultiIndices.hpp:51
USER_BASE
@ USER_BASE
user implemented approximation base
Definition: definitions.h:68
MoFEM::Interface
DeprecatedCoreInterface Interface
Definition: Interface.hpp:2010
MoFEM::AinsworthOrderHooks::broken_nbfacetri_edge_hdiv
static boost::function< int(int)> broken_nbfacetri_edge_hdiv
Definition: Hdiv.hpp:25
MoFEM::Field::tagNamePrefixSize
int tagNamePrefixSize
Definition: FieldMultiIndices.hpp:92
MoFEM::Field::tagNameSize
int tagNameSize
number of bits necessary to keep field name
Definition: FieldMultiIndices.hpp:90
MoFEM::Field::getId
const BitFieldId & getId() const
Get unique field id.
Definition: FieldMultiIndices.hpp:129
MoFEM::Exceptions::rval
static MoFEMErrorCodeGeneric< moab::ErrorCode > rval
Definition: Exceptions.hpp:74
MoFEM::PetscGlobalIdx_mi_tag::IamNotPartitioned
static const bool IamNotPartitioned
Definition: TagMultiIndices.hpp:39
MoFEM::AinsworthOrderHooks::broken_nbvolumetet_edge_hdiv
static boost::function< int(int)> broken_nbvolumetet_edge_hdiv
Definition: Hdiv.hpp:27
CHKERR
#define CHKERR
Inline error check.
Definition: definitions.h:548
MoFEM
implementation of Data Operators for Forces and Sources
Definition: Common.hpp:10
NBFACEQUAD_L2
#define NBFACEQUAD_L2(P)
Number of base functions on quad for L2 space.
Definition: h1_hdiv_hcurl_l2.h:70
NBVOLUMETET_AINSWORTH_VOLUME_HDIV
#define NBVOLUMETET_AINSWORTH_VOLUME_HDIV(P)
Definition: h1_hdiv_hcurl_l2.h:135
MoFEM::Field::getNameRef
boost::string_ref getNameRef() const
Get string reference to field name.
Definition: FieldMultiIndices.hpp:135
NBVOLUMEHEX_DEMKOWICZ_HDIV
#define NBVOLUMEHEX_DEMKOWICZ_HDIV(P)
Definition: h1_hdiv_hcurl_l2.h:149
MoFEM::Field::th_FieldDataVerts
Tag th_FieldDataVerts
Tag storing field values on vertices in the field.
Definition: FieldMultiIndices.hpp:76
NBEDGE_L2
#define NBEDGE_L2(P)
Number of base functions on edge from L2 space.
Definition: h1_hdiv_hcurl_l2.h:48
NBFACETRI_DEMKOWICZ_HDIV
#define NBFACETRI_DEMKOWICZ_HDIV(P)
Definition: h1_hdiv_hcurl_l2.h:139
MoFEM::Version
Definition: UnknownInterface.hpp:12
MoFEM::Version::buildVersion
int buildVersion
Definition: UnknownInterface.hpp:15
EshelbianPlasticity::P
@ P
Definition: EshelbianContact.cpp:197
MoFEM::Field::tagBaseData
FieldApproximationBase * tagBaseData
tag keeps field base
Definition: FieldMultiIndices.hpp:84
NBVOLUMETET_DEMKOWICZ_HDIV
#define NBVOLUMETET_DEMKOWICZ_HDIV(P)
Definition: h1_hdiv_hcurl_l2.h:140
MoFEM::Field::getContinuityName
auto getContinuityName() const
Get field space continuity name.
Definition: FieldMultiIndices.hpp:170
NBEDGE_DEMKOWICZ_HCURL
#define NBEDGE_DEMKOWICZ_HCURL(P)
Definition: h1_hdiv_hcurl_l2.h:108
MoFEM::FieldEntityEntFiniteElementAdjacencyMap::entFePtr
const boost::shared_ptr< EntFiniteElement > entFePtr
finite element entity
Definition: AdjacencyMultiIndices.hpp:21
MoFEM::Field::tagName
const void * tagName
tag keeps name of the field
Definition: FieldMultiIndices.hpp:89
AINSWORTH_LOBATTO_BASE
@ AINSWORTH_LOBATTO_BASE
Definition: definitions.h:62
MoFEM::Field::tagNbCoeffData
FieldCoefficientsNumber * tagNbCoeffData
Definition: FieldMultiIndices.hpp:88
NBFACEQUAD_H1
#define NBFACEQUAD_H1(P)
Number of base functions on quad for H1 space.
Definition: h1_hdiv_hcurl_l2.h:65
t
constexpr double t
plate stiffness
Definition: plate.cpp:58
MoFEM::AinsworthOrderHooks::broken_nbfacetri_face_hdiv
static boost::function< int(int)> broken_nbfacetri_face_hdiv
Definition: Hdiv.hpp:26
MoFEM::Field::dofOrderMap
DofsOrderMap dofOrderMap
Definition: FieldMultiIndices.hpp:304
NBFACETRI_DEMKOWICZ_HCURL
#define NBFACETRI_DEMKOWICZ_HCURL(P)
Definition: h1_hdiv_hcurl_l2.h:109
AINSWORTH_BERNSTEIN_BEZIER_BASE
@ AINSWORTH_BERNSTEIN_BEZIER_BASE
Definition: definitions.h:64
NBEDGE_HDIV
#define NBEDGE_HDIV(P)
Definition: h1_hdiv_hcurl_l2.h:129
MAX_DOFS_ON_ENTITY
#define MAX_DOFS_ON_ENTITY
Maximal number of DOFs on entity.
Definition: definitions.h:249
MoFEM::Version::minorVersion
int minorVersion
Definition: UnknownInterface.hpp:14
MoFEM::FieldEntityEntFiniteElementAdjacencyMap
FieldEntityEntFiniteElementAdjacencyMap of mofem finite element and entities.
Definition: AdjacencyMultiIndices.hpp:18
NBEDGE_AINSWORTH_HCURL
#define NBEDGE_AINSWORTH_HCURL(P)
Definition: h1_hdiv_hcurl_l2.h:97
FTensor::dd
const Tensor2_symmetric_Expr< const ddTensor0< T, Dim, i, j >, typename promote< T, double >::V, Dim, i, j > dd(const Tensor0< T * > &a, const Index< i, Dim > index1, const Index< j, Dim > index2, const Tensor1< int, Dim > &d_ijk, const Tensor1< double, Dim > &d_xyz)
Definition: ddTensor0.hpp:33
NBFACETRI_H1
#define NBFACETRI_H1(P)
Number of base function on triangle for H1 space.
Definition: h1_hdiv_hcurl_l2.h:60
MoFEM::Field::th_AppOrder
Tag th_AppOrder
Tag storing approximation order on entity.
Definition: FieldMultiIndices.hpp:78
MoFEM::FieldEntityEntFiniteElementAdjacencyMap::FieldEntityEntFiniteElementAdjacencyMap
FieldEntityEntFiniteElementAdjacencyMap(const boost::shared_ptr< FieldEntity > &ent_field_ptr, const boost::shared_ptr< EntFiniteElement > &ent_fe_ptr)
Definition: FieldMultiIndices.cpp:561
MoFEM::Field::Field
Field(moab::Interface &moab, const EntityHandle meshset)
constructor for moab field
Definition: FieldMultiIndices.cpp:17
MoFEM::Types::ApproximationOrder
int ApproximationOrder
Approximation on the entity.
Definition: Types.hpp:26
DEMKOWICZ_JACOBI_BASE
@ DEMKOWICZ_JACOBI_BASE
Definition: definitions.h:66
MoFEM::FieldEntityEntFiniteElementAdjacencyMap::entFieldPtr
const boost::shared_ptr< FieldEntity > entFieldPtr
field entity
Definition: AdjacencyMultiIndices.hpp:20
NBFACEQUAD_DEMKOWICZ_HDIV
#define NBFACEQUAD_DEMKOWICZ_HDIV(P)
Definition: h1_hdiv_hcurl_l2.h:145
MoFEM::Field::bitNumber
unsigned int bitNumber
Definition: FieldMultiIndices.hpp:107
MoFEM::Idx_mi_tag::IamNotPartitioned
static const bool IamNotPartitioned
Definition: TagMultiIndices.hpp:32
NBVOLUMETET_AINSWORTH_HCURL
#define NBVOLUMETET_AINSWORTH_HCURL(P)
Definition: h1_hdiv_hcurl_l2.h:105
NBFACETRI_L2
#define NBFACETRI_L2(P)
Number of base functions on triangle for L2 space.
Definition: h1_hdiv_hcurl_l2.h:42
DISCONTINUOUS
@ DISCONTINUOUS
Broken continuity (No effect on L2 space)
Definition: definitions.h:101
UBlasVector< double >
MoFEM::Exceptions::ierr
static MoFEMErrorCodeGeneric< PetscErrorCode > ierr
Definition: Exceptions.hpp:76
AINSWORTH_LEGENDRE_BASE
@ AINSWORTH_LEGENDRE_BASE
Ainsworth Cole (Legendre) approx. base .
Definition: definitions.h:60
HCURL
@ HCURL
field with continuous tangents
Definition: definitions.h:86
NBVOLUMEHEX_H1
#define NBVOLUMEHEX_H1(P)
Number of base functions on hex for H1 space.
Definition: h1_hdiv_hcurl_l2.h:93
NBFACETRI_AINSWORTH_FACE_HDIV
#define NBFACETRI_AINSWORTH_FACE_HDIV(P)
Definition: h1_hdiv_hcurl_l2.h:131
MoFEM::Field::tagNamePrefixData
const void * tagNamePrefixData
tag keeps name prefix of the field
Definition: FieldMultiIndices.hpp:91
NBFACETRI_AINSWORTH_HCURL
#define NBFACETRI_AINSWORTH_HCURL(P)
Definition: h1_hdiv_hcurl_l2.h:100
NBVOLUMEPRISM_H1
#define NBVOLUMEPRISM_H1(P)
Number of base functions on prism for H1 space.
Definition: h1_hdiv_hcurl_l2.h:80
MoFEM::Field::getBitNumberCalculate
FieldBitNumber getBitNumberCalculate() const
Calculate number of set bit in Field ID. Each field has uid, get getBitNumber get number of bit set f...
Definition: FieldMultiIndices.hpp:232
CONTINUOUS
@ CONTINUOUS
Regular field.
Definition: definitions.h:100
NBVOLUMETET_AINSWORTH_EDGE_HDIV
#define NBVOLUMETET_AINSWORTH_EDGE_HDIV(P)
Definition: h1_hdiv_hcurl_l2.h:133
MoFEMFunctionReturn
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:429
HDIV
@ HDIV
field with continuous normal traction
Definition: definitions.h:87
MoFEM::Field::forderTable
FieldOrderTable forderTable
nb. DOFs table for entities
Definition: FieldMultiIndices.hpp:94
MoFEM::Field::meshSet
EntityHandle meshSet
keeps entities for this meshset
Definition: FieldMultiIndices.hpp:73
MoFEMFunctionBegin
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:359
NBVOLUMEHEX_L2
#define NBVOLUMEHEX_L2(P)
Number of base functions on hexahedron for L2 space.
Definition: h1_hdiv_hcurl_l2.h:37
NOFIELD
@ NOFIELD
scalar or vector of scalars describe (no true field)
Definition: definitions.h:84
MoFEM::Field::tagId
BitFieldId * tagId
Tag field rank.
Definition: FieldMultiIndices.hpp:81