v0.8.16
Core.cpp
Go to the documentation of this file.
1 /** \file Core.cpp
2  * \brief Multi-index containers, data structures and other low-level functions
3  */
4 
5 /* MoFEM is free software: you can redistribute it and/or modify it under
6  * the terms of the GNU Lesser General Public License as published by the
7  * Free Software Foundation, either version 3 of the License, or (at your
8  * option) any later version.
9  *
10  * MoFEM is distributed in the hope that it will be useful, but WITHOUT
11  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
13  * License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with MoFEM. If not, see <http://www.gnu.org/licenses/>
17  */
18 
19 extern "C" {
21 }
22 
23 namespace MoFEM {
24 
26  UnknownInterface **iface) const {
28  *iface = NULL;
29  if (uuid == IDD_MOFEMCoreInterface) {
30  *iface = static_cast<CoreInterface *>(const_cast<Core *>(this));
32  } else if (uuid == IDD_MOFEMDeprecatedCoreInterface) {
33  *iface = static_cast<DeprecatedCoreInterface *>(const_cast<Core *>(this));
35  }
36  // Get sub-interface
37  unsigned long int id = uuid.uUId.to_ulong();
38  boost::ptr_map<unsigned long, UnknownInterface>::iterator it;
39  it = iFaces.find(id);
40  if (it != iFaces.end()) {
41  *iface = it->second;
43  }
44  *iface = NULL;
45  SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY, "unknown interface");
47 }
48 
49 bool Core::isGloballyInitialised = false;
50 
51 MoFEMErrorCode Core::Initialize(int *argc, char ***args, const char file[],
52  const char help[]) {
53  ierr = PetscInitialize(argc, args, file, help);
54  CHKERRG(ierr);
55  ierr = PetscPushErrorHandler(mofem_error_handler, PETSC_NULL);
56  CHKERRG(ierr);
57  isGloballyInitialised = true;
58  return MOFEM_SUCCESS;
59 }
60 
62  CHKERRQ(ierr);
63  ierr = PetscPopErrorHandler();
64  CHKERRG(ierr);
65  isGloballyInitialised = false;
66  return PetscFinalize();
67 }
68 
69 template <class IFACE>
72  CHKERR registerInterface<IFACE>(uid, false);
73  unsigned long int id = uid.uUId.to_ulong();
74  iFaces.insert(id, new IFACE(*this));
76 }
77 
78 Core::Core(moab::Interface &moab, MPI_Comm comm, const int verbose,
79  const bool distributed_mesh)
80  : moab(moab), cOmm(0), verbose(verbose),
81  initaliseAndBuildField(PETSC_FALSE),
82  initaliseAndBuildFiniteElements(PETSC_FALSE) {
83 
84  // This is deprecated ONE should use MoFEM::Core::Initialize
85  if (!isGloballyInitialised) {
86  PetscPushErrorHandler(mofem_error_handler, PETSC_NULL);
87  isGloballyInitialised = true;
88  }
89 
90  // Register interfaces for this implementation
91  ierr = registerInterface<UnknownInterface>(IDD_MOFEMUnknown);
92  CHKERRABORT(comm, ierr);
93  ierr = registerInterface<CoreInterface>(IDD_MOFEMCoreInterface);
94  CHKERRABORT(comm, ierr);
95  ierr = registerInterface<DeprecatedCoreInterface>(
97  CHKERRABORT(comm, ierr);
98 
99  // Register sub-interfaces
101  CHKERRABORT(PETSC_COMM_SELF, ierr);
102 
103  // Register MOFEM events in PETSc
104  PetscLogEventRegister("FE_preProcess", 0, &MOFEM_EVENT_preProcess);
105  PetscLogEventRegister("FE_operator", 0, &MOFEM_EVENT_operator);
106  PetscLogEventRegister("FE_postProcess", 0, &MOFEM_EVENT_postProcess);
107  PetscLogEventRegister("MoFEMCreateMat", 0, &MOFEM_EVENT_createMat);
108 
109  // Create duplicate communicator
110  wrapMPIComm = boost::make_shared<WrapMPIComm>(comm,cOmm);
111  MPI_Comm_size(cOmm, &sIze);
112  MPI_Comm_rank(cOmm, &rAnk);
113  // CHeck if moab has set communicator if not set communicator interbally
114  ParallelComm *pComm = ParallelComm::get_pcomm(&moab, MYPCOMM_INDEX);
115  if (pComm == NULL) {
116  pComm = new ParallelComm(&moab, cOmm);
117  }
118 
119  // Initialize database
120  ierr = getTags();
121  CHKERRABORT(cOmm, ierr);
122  ierr = clearMap();
123  CHKERRABORT(cOmm, ierr);
124 
125  basicEntityDataPtr = boost::make_shared<BasicEntityData>(moab);
126  if (distributed_mesh)
127  basicEntityDataPtr->setDistributedMesh();
128  else
129  basicEntityDataPtr->unSetDistributedMesh();
130 
132  CHKERRABORT(cOmm, ierr);
134  CHKERRABORT(cOmm, ierr);
135 
136  // Print version
137  if (verbose > QUIET) {
138  char petsc_version[255];
139  ierr = PetscGetVersion(petsc_version, 255);
140  CHKERRABORT(cOmm, ierr);
141  ierr = PetscPrintf(cOmm, "MoFEM version %d.%d.%d (%s %s) \n",
142  MoFEM_VERSION_MAJOR, MoFEM_VERSION_MINOR,
143  MoFEM_VERSION_BUILD, MOAB_VERSION_STRING, petsc_version);
144  CHKERRABORT(cOmm, ierr);
145  ierr = PetscPrintf(cOmm, "git commit id %s\n", GIT_SHA1_NAME);
146  CHKERRABORT(cOmm, ierr);
147  }
148 }
149 
151  PetscBool is_finalized;
152  PetscFinalized(&is_finalized);
153  // Destroy interfaces
154  iFaces.clear();
155  // This is deprecated ONE should use MoFEM::Core::Initialize
156  if (isGloballyInitialised && is_finalized) {
157  isGloballyInitialised = false;
158  }
159 }
160 
163 
164  iFaces.clear();
165 
166  // Register sub interfaces
167  CHKERR regSubInterface<Simple>(IDD_MOFEMSimple);
168  CHKERR regSubInterface<ProblemsManager>(IDD_MOFEMProblemsManager);
169  CHKERR regSubInterface<ISManager>(IDD_MOFEMISManager);
170  CHKERR regSubInterface<VecManager>(IDD_MOFEMVEC);
171  CHKERR regSubInterface<FieldBlas>(IDD_MOFEMFieldBlas);
172  CHKERR regSubInterface<BitRefManager>(IDD_MOFEMBitRefManager);
173  CHKERR regSubInterface<Tools>(IDD_MOFEMTools);
174  CHKERR regSubInterface<MeshsetsManager>(IDD_MOFEMMeshsetsManager);
175  CHKERR regSubInterface<CoordSystemsManager>(IDD_MOFEMCoordsSystemsManager);
176  CHKERR regSubInterface<NodeMergerInterface>(IDD_MOFEMNodeMerger);
177  CHKERR regSubInterface<BitLevelCoupler>(IDD_MOFEMBitLevelCoupler);
178  CHKERR regSubInterface<PrismsFromSurfaceInterface>(
180  CHKERR regSubInterface<MeshRefinement>(IDD_MOFEMMeshRefine);
181  CHKERR regSubInterface<PrismInterface>(IDD_MOFEMPrismInterface);
182  CHKERR regSubInterface<CutMeshInterface>(IDD_MOFEMCutMesh);
183  CHKERR regSubInterface<SeriesRecorder>(IDD_MOFEMSeriesRecorder);
184 #ifdef WITH_TETGEN
185  CHKERR regSubInterface<TetGenInterface>(IDD_MOFEMTetGegInterface);
186 #endif
187 #ifdef WITH_MED
188  CHKERR regSubInterface<MedInterface>(IDD_MOFEMMedInterface);
189 #endif
190 
192 };
193 
195  if (*fShift >= BITFIELDID_SIZE) {
196  char msg[] = "number of fields exceeded";
197  PetscTraceBackErrorHandler(cOmm, __LINE__, PETSC_FUNCTION_NAME, __FILE__,
198  MOFEM_DATA_INCONSISTENCY, PETSC_ERROR_INITIAL,
199  msg, PETSC_NULL);
200  PetscMPIAbortErrorHandler(cOmm, __LINE__, PETSC_FUNCTION_NAME, __FILE__,
201  MOFEM_DATA_INCONSISTENCY, PETSC_ERROR_INITIAL,
202  msg, PETSC_NULL);
203  }
204  return BitFieldId().set(((*fShift)++) - 1);
205 }
207  assert((unsigned int)*feShift < BitFEId().set().to_ulong());
208  return BitFEId(1 << (((*feShift)++) - 1));
209 }
210 
212  assert((unsigned int)*pShift < BitProblemId().set().to_ulong());
213  return BitProblemId(1 << (((*pShift)++) - 1));
214 }
215 
218  // Cleaning databases in interfaces
219  CHKERR getInterface<SeriesRecorder>()->clearMap();
220  CHKERR getInterface<MeshsetsManager>()->clearMap();
221  CHKERR getInterface<CoordSystemsManager>()->clearMap();
222  CHKERR getInterface<CutMeshInterface>()->clearMap();
223  // Cleaning databases
224  refinedEntities.clear();
225  refinedFiniteElements.clear();
226  fIelds.clear();
227  entsFields.clear();
228  dofsField.clear();
229  finiteElements.clear();
230  entsFiniteElements.clear();
231  entFEAdjacencies.clear();
232  pRoblems.clear();
234 }
235 
238  if (verb == -1)
239  verb = verbose;
240  std::pair<RefEntity_multiIndex::iterator, bool> p_ent;
241  p_ent = refinedEntities.insert(
242  boost::make_shared<RefEntity>(basicEntityDataPtr, prism));
243  if (p_ent.second) {
244  std::pair<RefElement_multiIndex::iterator, bool> p;
245  p = refinedFiniteElements.insert(
246  boost::shared_ptr<RefElement>(new RefElement_PRISM(*p_ent.first)));
247  int num_nodes;
248  const EntityHandle *conn;
249  CHKERR get_moab().get_connectivity(prism, conn, num_nodes, true);
250  Range face_side3, face_side4;
251  CHKERR get_moab().get_adjacencies(conn, 3, 2, false, face_side3);
252  CHKERR get_moab().get_adjacencies(&conn[3], 3, 2, false, face_side4);
253  if (face_side3.size() != 1)
254  SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
255  "prism don't have side face 3");
256  if (face_side4.size() != 1)
257  SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
258  "prims don't have side face 4");
259  p.first->get()->getSideNumberPtr(*face_side3.begin());
260  p.first->get()->getSideNumberPtr(*face_side4.begin());
261  }
263 }
264 
267 
268  const EntityHandle root_meshset = get_moab().get_root_set();
269  if (root_meshset) {
270  SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
271  "Root meshset should be 0");
272  }
273 
274  // Set version
275  {
276  Version version;
277  CHKERR getFileVersion(moab, version);
278  }
279 
280  // Global Variables
281  {
282  // Fields
283  int def_shift = 1;
284  rval = get_moab().tag_get_handle("_FieldShift", 1, MB_TYPE_INTEGER,
285  th_FieldShift, MB_TAG_CREAT | MB_TAG_MESH,
286  &def_shift);
287  if (rval == MB_ALREADY_ALLOCATED)
288  rval = MB_SUCCESS;
289  else
290  CHKERRG(rval);
291  const void *tag_data[1];
292  CHKERR get_moab().tag_get_by_ptr(th_FieldShift, &root_meshset, 1, tag_data);
293  fShift = (int *)tag_data[0];
294  // FE
295  rval = get_moab().tag_get_handle("_FEShift", 1, MB_TYPE_INTEGER, th_FEShift,
296  MB_TAG_CREAT | MB_TAG_MESH, &def_shift);
297  if (rval == MB_ALREADY_ALLOCATED)
298  rval = MB_SUCCESS;
299  else
300  CHKERRG(rval);
301  CHKERR get_moab().tag_get_by_ptr(th_FEShift, &root_meshset, 1, tag_data);
302  feShift = (int *)tag_data[0];
303  // Problem
304  rval = get_moab().tag_get_handle("_ProblemShift", 1, MB_TYPE_INTEGER,
306  MB_TAG_CREAT | MB_TAG_MESH, &def_shift);
307  if (rval == MB_ALREADY_ALLOCATED)
308  rval = MB_SUCCESS;
309  else
310  CHKERRG(rval);
311  CHKERR get_moab().tag_get_by_ptr(th_ProblemShift, &root_meshset, 1,
312  tag_data);
313  pShift = (int *)tag_data[0];
314  // Safety nets
315  int def_bool = 0;
316  rval = get_moab().tag_get_handle("_MoFEMBuild", 1, MB_TYPE_INTEGER,
317  th_MoFEMBuild, MB_TAG_CREAT | MB_TAG_MESH,
318  &def_bool);
319  if (rval == MB_ALREADY_ALLOCATED)
320  rval = MB_SUCCESS;
321  else
322  CHKERRG(rval);
323  CHKERR get_moab().tag_get_by_ptr(th_MoFEMBuild, &root_meshset, 1,
324  (const void **)&buildMoFEM);
325  }
326 
327  // Tags saved in vtk-files
328  {
329  const int def_part = -1;
330  CHKERR get_moab().tag_get_handle("PARTITION", 1, MB_TYPE_INTEGER, th_Part,
331  MB_TAG_CREAT | MB_TAG_SPARSE, &def_part);
332  int def_elem_type = MBMAXTYPE;
333  CHKERR get_moab().tag_get_handle("ElemType", 1, MB_TYPE_INTEGER,
334  th_ElemType, MB_TAG_CREAT | MB_TAG_SPARSE,
335  &def_elem_type);
336  }
337 
338  // Tags Ref
339  {
340  EntityHandle def_handle = 0;
341  CHKERR get_moab().tag_get_handle("_RefParentHandle", 1, MB_TYPE_HANDLE,
343  MB_TAG_CREAT | MB_TAG_SPARSE, &def_handle);
344  BitRefLevel def_bit_level = 0;
345  CHKERR get_moab().tag_get_handle(
346  "_RefBitLevel", sizeof(BitRefLevel), MB_TYPE_OPAQUE, th_RefBitLevel,
347  MB_TAG_CREAT | MB_TAG_BYTES | MB_TAG_SPARSE, &def_bit_level);
348  BitRefLevel def_bit_level_mask = BitRefLevel().set();
349  CHKERR get_moab().tag_get_handle(
350  "_RefBitLevelMask", sizeof(BitRefLevel), MB_TYPE_OPAQUE,
351  th_RefBitLevel_Mask, MB_TAG_CREAT | MB_TAG_BYTES | MB_TAG_SPARSE,
352  &def_bit_level_mask);
353  BitRefEdges def_bit_edge = 0;
354  CHKERR get_moab().tag_get_handle(
355  "_RefBitEdge", sizeof(BitRefEdges), MB_TYPE_OPAQUE, th_RefBitEdge,
356  MB_TAG_CREAT | MB_TAG_SPARSE | MB_TAG_BYTES, &def_bit_edge);
357  const int def_type[] = {0, 0};
358  CHKERR get_moab().tag_get_handle("_RefType", 2, MB_TYPE_INTEGER, th_RefType,
359  MB_TAG_CREAT | MB_TAG_SPARSE, def_type);
360  }
361 
362  // Tags Field
363  {
364  const unsigned long int def_id = 0;
365  CHKERR get_moab().tag_get_handle(
366  "_FieldId", sizeof(BitFieldId), MB_TYPE_OPAQUE, th_FieldId,
367  MB_TAG_CREAT | MB_TAG_BYTES | MB_TAG_SPARSE, &def_id);
368  FieldSpace def_space = LASTSPACE;
369  CHKERR get_moab().tag_get_handle(
370  "_FieldSpace", sizeof(FieldSpace), MB_TYPE_OPAQUE, th_FieldSpace,
371  MB_TAG_CREAT | MB_TAG_BYTES | MB_TAG_SPARSE, &def_space);
372  FieldApproximationBase def_base = LASTBASE;
373  CHKERR get_moab().tag_get_handle(
374  "_FieldBase", sizeof(FieldApproximationBase), MB_TYPE_OPAQUE,
375  th_FieldBase, MB_TAG_CREAT | MB_TAG_BYTES | MB_TAG_SPARSE, &def_base);
376  const int def_val_len = 0;
377  CHKERR get_moab().tag_get_handle(
378  "_FieldName", def_val_len, MB_TYPE_OPAQUE, th_FieldName,
379  MB_TAG_CREAT | MB_TAG_BYTES | MB_TAG_VARLEN | MB_TAG_SPARSE, NULL);
380  CHKERR get_moab().tag_get_handle(
381  "_FieldName_DataNamePrefix", def_val_len, MB_TYPE_OPAQUE,
383  MB_TAG_CREAT | MB_TAG_BYTES | MB_TAG_VARLEN | MB_TAG_SPARSE, NULL);
384  }
385 
386  // Tags FE
387  {
388  const unsigned long int def_id = 0;
389  const int def_val_len = 0;
390  CHKERR get_moab().tag_get_handle(
391  "_FEId", sizeof(BitFEId), MB_TYPE_OPAQUE, th_FEId,
392  MB_TAG_CREAT | MB_TAG_BYTES | MB_TAG_SPARSE, &def_id);
393  CHKERR get_moab().tag_get_handle(
394  "_FEName", def_val_len, MB_TYPE_OPAQUE, th_FEName,
395  MB_TAG_CREAT | MB_TAG_BYTES | MB_TAG_VARLEN | MB_TAG_SPARSE, NULL);
396  CHKERR get_moab().tag_get_handle(
397  "_FEIdCol", sizeof(BitFieldId), MB_TYPE_OPAQUE, th_FEIdCol,
398  MB_TAG_CREAT | MB_TAG_BYTES | MB_TAG_SPARSE, &def_id);
399  CHKERR get_moab().tag_get_handle(
400  "_FEIdRow", sizeof(BitFieldId), MB_TYPE_OPAQUE, th_FEIdRow,
401  MB_TAG_CREAT | MB_TAG_BYTES | MB_TAG_SPARSE, &def_id);
402  CHKERR get_moab().tag_get_handle(
403  "_FEIdData", sizeof(BitFieldId), MB_TYPE_OPAQUE, th_FEIdData,
404  MB_TAG_CREAT | MB_TAG_BYTES | MB_TAG_SPARSE, &def_id);
405  }
406 
407  // Tags Problem
408  {
409  const unsigned long int def_id = 0;
410  const int def_val_len = 0;
411  CHKERR get_moab().tag_get_handle(
412  "_ProblemId", sizeof(BitProblemId), MB_TYPE_OPAQUE, th_ProblemId,
413  MB_TAG_CREAT | MB_TAG_BYTES | MB_TAG_SPARSE, &def_id);
414  CHKERR get_moab().tag_get_handle(
415  "_ProblemFEId", sizeof(BitFEId), MB_TYPE_OPAQUE, th_ProblemFEId,
416  MB_TAG_CREAT | MB_TAG_BYTES | MB_TAG_SPARSE, &def_id);
417  CHKERR get_moab().tag_get_handle(
418  "_ProblemName", def_val_len, MB_TYPE_OPAQUE, th_ProblemName,
419  MB_TAG_CREAT | MB_TAG_BYTES | MB_TAG_VARLEN | MB_TAG_SPARSE, NULL);
420  DofIdx def_nbdofs = 0;
421  CHKERR get_moab().tag_get_handle(
422  "_ProblemNbDofsRow", sizeof(DofIdx), MB_TYPE_OPAQUE,
423  th_ProblemNbDofsRow, MB_TAG_CREAT | MB_TAG_BYTES | MB_TAG_SPARSE,
424  &def_nbdofs);
425  CHKERR get_moab().tag_get_handle(
426  "_ProblemNbDofsCol", sizeof(DofIdx), MB_TYPE_OPAQUE,
427  th_ProblemNbDofsCol, MB_TAG_CREAT | MB_TAG_BYTES | MB_TAG_SPARSE,
428  &def_nbdofs);
429  CHKERR get_moab().tag_get_handle(
430  "_ProblemLocalNbDofsRow", sizeof(DofIdx), MB_TYPE_OPAQUE,
431  th_ProblemLocalNbDofRow, MB_TAG_CREAT | MB_TAG_BYTES | MB_TAG_SPARSE,
432  &def_nbdofs);
433  CHKERR get_moab().tag_get_handle(
434  "_ProblemGhostNbDofsRow", sizeof(DofIdx), MB_TYPE_OPAQUE,
435  th_ProblemGhostNbDofRow, MB_TAG_CREAT | MB_TAG_BYTES | MB_TAG_SPARSE,
436  &def_nbdofs);
437  CHKERR get_moab().tag_get_handle(
438  "_ProblemLocalNbDofsCol", sizeof(DofIdx), MB_TYPE_OPAQUE,
439  th_ProblemLocalNbDofCol, MB_TAG_CREAT | MB_TAG_BYTES | MB_TAG_SPARSE,
440  &def_nbdofs);
441  CHKERR get_moab().tag_get_handle(
442  "_ProblemGhostNbDofsCol", sizeof(DofIdx), MB_TYPE_OPAQUE,
443  th_ProblemGhostNbDofCol, MB_TAG_CREAT | MB_TAG_BYTES | MB_TAG_SPARSE,
444  &def_nbdofs);
445  }
446 
447  // Meshsets with boundary conditions and material sets
448  MeshsetsManager *meshsets_manager_ptr;
449  CHKERR getInterface(meshsets_manager_ptr);
450  CHKERR meshsets_manager_ptr->getTags(verb);
451 
452  // Series recorder
453  SeriesRecorder *series_recorder_ptr;
454  CHKERR getInterface(series_recorder_ptr);
455  CHKERR series_recorder_ptr->getTags(verb);
456 
457  // Coordinate systems
458  CoordSystemsManager *cs_manger_ptr;
459  CHKERR getInterface(cs_manger_ptr);
460  CHKERR cs_manger_ptr->getTags(verb);
461 
463 }
464 
467  if (verb == -1)
468  verb = verbose;
469  CHKERR clearMap();
471 }
472 
475  if (verb == -1)
476  verb = verbose;
477  CHKERR clearMap();
478  CHKERR getTags(verb);
481 }
482 
483 MoFEMErrorCode Core::set_moab_interface(moab::Interface &new_moab, int verb,
484  const bool distributed_mesh) {
486  if (verb == -1)
487  verb = verbose;
488 
489  // clear moab database
490  CHKERR clearMap();
491 
492  // set new reference
493  moab = std::ref(new_moab);
494 
495  // check if moab has set communicator if not set communicator internally
496  ParallelComm *pComm = ParallelComm::get_pcomm(&new_moab, MYPCOMM_INDEX);
497  if (pComm == NULL) {
498  pComm = new ParallelComm(&new_moab, cOmm);
499  }
500 
501  // create MoFEM tags
502  CHKERR getTags();
503 
504  // Create basic entity data struture
505  basicEntityDataPtr = boost::make_shared<BasicEntityData>(moab);
506  if (distributed_mesh)
507  basicEntityDataPtr->setDistributedMesh();
508  else
509  basicEntityDataPtr->unSetDistributedMesh();
510 
511  // Initalise database
513 
515 };
516 
519  if (verb == -1)
520  verb = verbose;
521 
522  CHKERR PetscOptionsBegin(cOmm, optionsPrefix.c_str(), "Mesh cut options",
523  "See MoFEM documentation");
524 
525  CHKERR PetscOptionsBool(
526  "-mofem_init_fields", "Initialise fields on construction", "",
528 
529  CHKERR PetscOptionsBool(
530  "-mofem_init_fields", "Initialise fields on construction", "",
532 
533  // TODO: Add read verbosity level
534  // TODO: Add option to initalise problems ??? - DO WE REALLY NEED THAT
535 
536  ierr = PetscOptionsEnd();
537  CHKERRG(ierr);
538 
540 }
541 
544  if (verb == -1)
545  verb = verbose;
546 
547  CoordSystemsManager *cs_manger_ptr;
548  CHKERR getInterface(cs_manger_ptr);
549 
550  // Initialize coordinate systems
551  CHKERR cs_manger_ptr->initialiseDatabaseFromMesh(verb);
552 
553  Range ref_elems_to_add;
554 
555  // Initialize database
556  Range meshsets;
557  CHKERR get_moab().get_entities_by_type(0, MBENTITYSET, meshsets, false);
558  Range special_meshsets;
559  for (Range::iterator mit = meshsets.begin(); mit != meshsets.end(); mit++) {
560  BitFieldId field_id;
561  // Get bit id form field tag
562  CHKERR get_moab().tag_get_data(th_FieldId, &*mit, 1, &field_id);
563  // Check if meshset if field meshset
564  if (field_id != 0) {
565  std::pair<Field_multiIndex::iterator, bool> p;
566  const char *cs_name;
567  int cs_name_size;
568  boost::shared_ptr<CoordSys> cs_ptr;
569  rval =
570  get_moab().tag_get_by_ptr(cs_manger_ptr->get_th_CoordSysName(), &*mit,
571  1, (const void **)&cs_name, &cs_name_size);
572  if (rval == MB_SUCCESS && cs_name_size) {
573  CHKERR cs_manger_ptr->getCoordSysPtr(std::string(cs_name, cs_name_size),
574  cs_ptr);
575  } else {
576  CHKERR cs_manger_ptr->getCoordSysPtr("UNDEFINED", cs_ptr);
577  }
578  p = fIelds.insert(
579  boost::shared_ptr<Field>(new Field(moab, *mit, cs_ptr)));
580  if (verb >= VERBOSE) {
581  std::ostringstream ss;
582  ss << "read field " << **p.first << std::endl;
583  PetscPrintf(cOmm, ss.str().c_str());
584  }
585  special_meshsets.insert(*mit);
586  }
587  // Check for finite elements
588  BitFieldId fe_id;
589  // Get bit id from fe tag
590  CHKERR get_moab().tag_get_data(th_FEId, &*mit, 1, &fe_id);
591  // check if meshset is finite element meshset
592  if (fe_id != 0) {
593  std::pair<FiniteElement_multiIndex::iterator, bool> p =
594  finiteElements.insert(
595  boost::shared_ptr<FiniteElement>(new FiniteElement(moab, *mit)));
596  if (verb >= VERBOSE) {
597  std::ostringstream ss;
598  ss << "read finite element " << **p.first << std::endl;
599  PetscPrintf(cOmm, ss.str().c_str());
600  }
601  NOT_USED(p);
602  Range ents;
603  CHKERR get_moab().get_entities_by_type(*mit, MBENTITYSET, ents, false);
604  CHKERR get_moab().get_entities_by_handle(*mit, ents, true);
605  ref_elems_to_add.merge(ents);
606  special_meshsets.insert(*mit);
607  }
608  BitProblemId problem_id;
609  // get bit id form problem tag
610  CHKERR get_moab().tag_get_data(th_ProblemId, &*mit, 1, &problem_id);
611  // check if meshset if problem meshset
612  if (problem_id != 0) {
613  std::pair<Problem_multiIndex::iterator, bool> p =
614  pRoblems.insert(Problem(moab, *mit));
615  if (verb >= VERBOSE) {
616  std::ostringstream ss;
617  ss << "read problem " << *p.first << " bit ref "
618  << p.first->getBitRefLevel() << " bit mask "
619  << p.first->getMaskBitRefLevel() << std::endl;
620  PetscPrintf(cOmm, ss.str().c_str());
621  }
622  special_meshsets.insert(*mit);
623  }
624  }
625 
626  // Add entities to database
627  Range bit_ref_ents;
628  CHKERR get_moab().get_entities_by_handle(0, bit_ref_ents, false);
629  bit_ref_ents = subtract(bit_ref_ents, special_meshsets);
630  CHKERR getInterface<BitRefManager>()->filterEntitiesByRefLevel(
631  BitRefLevel().set(), BitRefLevel().set(), bit_ref_ents);
632  CHKERR getInterface<BitRefManager>()->setEntitiesBitRefLevel(bit_ref_ents);
633  CHKERR getInterface<BitRefManager>()->setElementsBitRefLevel(
634  ref_elems_to_add);
635 
636  // Build field entities
637  for (Field_multiIndex::iterator fit = fIelds.begin(); fit != fIelds.end();
638  ++fit) {
639  Range ents_of_id_meshset;
640  CHKERR get_moab().get_entities_by_handle(fit->get()->getMeshset(),
641  ents_of_id_meshset, false);
642  CHKERR set_field_order(ents_of_id_meshset, fit->get()->getId(), -1);
643  }
644 
646  CHKERR build_fields(verb);
649  }
650  }
651 
652  if (verb > VERY_NOISY) {
653  list_fields();
655  list_problem();
656  }
657 
658  // Initialize interfaces
659  MeshsetsManager *m_manger_ptr;
660  CHKERR getInterface(m_manger_ptr);
661  CHKERR m_manger_ptr->initialiseDatabaseFromMesh(verb);
662  SeriesRecorder *series_recorder_ptr;
663  CHKERR getInterface(series_recorder_ptr);
664  CHKERR series_recorder_ptr->initialiseDatabaseFromMesh(verb);
665 
667 }
668 
669 // cubit meshsets
670 
673  *fields_ptr = &fIelds;
675 }
676 
678 Core::get_ref_ents(const RefEntity_multiIndex **refined_entities_ptr) const {
680  *refined_entities_ptr = &refinedEntities;
682 }
684  const RefElement_multiIndex **refined_finite_elements_ptr) const {
686  *refined_finite_elements_ptr = &refinedFiniteElements;
688 }
689 
690 MoFEMErrorCode Core::get_problem(const std::string &problem_name,
691  const Problem **problem_ptr) const {
693  typedef Problem_multiIndex::index<Problem_mi_tag>::type ProblemsByName;
694  const ProblemsByName &problems = pRoblems.get<Problem_mi_tag>();
695  ProblemsByName::iterator p_miit = problems.find(problem_name);
696  if (p_miit == problems.end()) {
697  SETERRQ1(PETSC_COMM_SELF, MOFEM_OPERATION_UNSUCCESSFUL,
698  "problem < %s > not found, (top tip: check spelling)",
699  problem_name.c_str());
700  }
701  *problem_ptr = &*p_miit;
703 }
704 
706 Core::get_problems(const Problem_multiIndex **problems_ptr) const {
708  *problems_ptr = &pRoblems;
710 }
711 
713 Core::get_field_ents(const FieldEntity_multiIndex **field_ents) const {
715  *field_ents = &entsFields;
717 }
720  *dofs_ptr = &dofsField;
722 }
723 
725  MeshsetsManager *meshsets_manager_ptr;
726  getInterface(meshsets_manager_ptr);
727  return meshsets_manager_ptr;
728 }
729 
731  MeshsetsManager *meshsets_manager_ptr;
732  getInterface(meshsets_manager_ptr);
733  return meshsets_manager_ptr;
734 }
735 
736 } // namespace MoFEM
MoFEMErrorCode initialiseDatabaseFromMesh(int verb=0)
Tag th_ProblemNbDofsCol
Definition: Core.hpp:209
static const MOFEMuuid IDD_MOFEMSeriesRecorder
DofEntity_multiIndex dofsField
dofs on fields
Definition: Core.hpp:249
MoFEMErrorCode clearMap()
Cleaning database.
Definition: Core.cpp:216
static const MOFEMuuid IDD_MOFEMCoreInterface
Definition: Interface.hpp:24
Tag th_FieldSpace
Definition: Core.hpp:204
Deprecated interface functions.
MoFEM interface unique ID.
int sIze
MoFEM communicator size.
Definition: Core.hpp:866
MoFEMErrorCode initialiseDatabaseFromMesh(int verb=DEFAULT_VERBOSITY)
Initialize database getting information on mesh.
Definition: Core.cpp:542
Tag th_FieldName_DataNamePrefix
Definition: Core.hpp:204
static const MOFEMuuid IDD_MOFEMMeshsetsManager
PetscLogEvent MOFEM_EVENT_postProcess
Event for postProcess finite element.
Definition: Core.hpp:854
boost::shared_ptr< WrapMPIComm > wrapMPIComm
Definition: Core.hpp:902
PetscErrorCode MoFEMErrorCode
MoFEM/PETSc error code.
Definition: Common.hpp:60
static const MOFEMuuid IDD_MOFEMProblemsManager
multi_index_container< boost::shared_ptr< RefElement >, indexed_by< ordered_unique< tag< Ent_mi_tag >, const_mem_fun< RefElement::interface_type_RefEntity, EntityHandle, &RefElement::getRefEnt > >, ordered_non_unique< tag< EntType_mi_tag >, const_mem_fun< RefElement::interface_type_RefEntity, EntityType, &RefElement::getEntType > > > > RefElement_multiIndex
MPI_Comm cOmm
MoFEM communicator.
Definition: Core.hpp:863
int * fShift
Ptr to tag handle storing last set bit in field ID.
Definition: Core.hpp:906
Tag th_FEIdCol
Definition: Core.hpp:207
RefEntity_multiIndex refinedEntities
refined entities
Definition: Core.hpp:244
std::bitset< BITPROBLEMID_SIZE > BitProblemId
Definition: Common.hpp:151
Provide data structure for (tensor) field approximation.The Field is intended to provide support for ...
FieldEntity_multiIndex entsFields
entities on fields
Definition: Core.hpp:248
MoFEMErrorCode rebuild_database(int verb=DEFAULT_VERBOSITY)
Clear database and initialize it once again.
Definition: Core.cpp:473
moab::Interface & get_moab()
Definition: Core.hpp:266
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:483
MoFEMErrorCode regSubInterface(const MOFEMuuid &uid)
Definition: Core.cpp:70
PetscLogEvent MOFEM_EVENT_operator
Event for evaluating operator of finite element.
Definition: Core.hpp:852
keeps data about abstract PRISM finite element
base class for all interface classes
Tag th_RefParentHandle
Definition: Core.hpp:201
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return() ...
Definition: definitions.h:459
static const MOFEMuuid IDD_MOFEMUnknown
IFACE getInterface() const
Get interface pointer to pointer of interface.
MoFEMErrorCode set_moab_interface(moab::Interface &new_moab, int verb=VERBOSE, const bool distributed_mesh=true)
Set the moab interface object.
Definition: Core.cpp:483
Tag th_ProblemFEId
Definition: Core.hpp:208
#define CHKERRG(n)
Check error code of MoFEM/MOAB/PETSc function.
Definition: definitions.h:526
multi_index_container< boost::shared_ptr< Field >, indexed_by< hashed_unique< tag< BitFieldId_mi_tag >, const_mem_fun< Field, const BitFieldId &, &Field::getId >, HashBit< BitFieldId >, EqBit< BitFieldId > >, ordered_unique< tag< Meshset_mi_tag >, member< Field, EntityHandle, &Field::meshSet > >, ordered_unique< tag< FieldName_mi_tag >, const_mem_fun< Field, boost::string_ref, &Field::getNameRef > >, ordered_non_unique< tag< BitFieldId_space_mi_tag >, const_mem_fun< Field, FieldSpace, &Field::getSpace > > > > Field_multiIndex
Field_multiIndex for Field.
MoFEMErrorCode get_fields(const Field_multiIndex **fields_ptr) const
Get fields multi-index from database.
Definition: Core.cpp:671
std::bitset< BITREFEDGES_SIZE > BitRefEdges
Definition: Common.hpp:141
static const MOFEMuuid IDD_MOFEMBitRefManager
MoFEMErrorCode list_finite_elements() const
list finite elements in database
Definition: FECore.cpp:331
std::bitset< BITFEID_SIZE > BitFEId
Definition: Common.hpp:150
BitIntefaceId uUId
PetscLogEvent MOFEM_EVENT_createMat
Definition: Core.hpp:855
static const MOFEMuuid IDD_MOFEMNodeMerger
Definition: NodeMerger.hpp:23
Tag th_FieldShift
Definition: Core.hpp:212
Interface for managing meshsets containing materials and boundary conditions.
std::bitset< BITFIELDID_SIZE > BitFieldId
Definition: Common.hpp:149
MoFEMErrorCode build_finite_elements(int verb=DEFAULT_VERBOSITY)
Build finite elementsBuild finite element data structures. Have to be run before problem and adjacenc...
Definition: FECore.cpp:765
static const MOFEMuuid IDD_MOFEMVEC
Definition: VecManager.hpp:26
Tag th_Part
Tag for partition number.
Definition: Core.hpp:200
Core(moab::Interface &moab, MPI_Comm comm=PETSC_COMM_WORLD, const int verbose=VERBOSE, const bool distributed_mesh=true)
Definition: Core.cpp:78
static const MOFEMuuid IDD_MOFEMPrismsFromSurface
Core (interface) class.
Definition: Core.hpp:50
Tag th_FEName
Definition: Core.hpp:206
Tag th_ElemType
Needed for VTK files.
Definition: Core.hpp:213
MoFEMErrorCode registerSubInterfaces()
Register insterfaces.
Definition: Core.cpp:161
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return() ...
Definition: definitions.h:490
BitProblemId getProblemShift()
Return unique problem Id.
Definition: Core.cpp:211
std::reference_wrapper< moab::Interface > moab
moab database
Definition: Core.hpp:265
keeps basic data about problemThis is low level structure with information about problem, what elements compose problem and what DOFs are on rows and columns.
PetscLogEvent MOFEM_EVENT_preProcess
Event for preProcess finite element.
Definition: Core.hpp:850
multi_index_container< boost::shared_ptr< FieldEntity >, indexed_by< ordered_unique< tag< Unique_mi_tag >, member< FieldEntity, UId, &FieldEntity::globalUid > >, ordered_non_unique< tag< FieldName_mi_tag >, const_mem_fun< FieldEntity::interface_type_Field, boost::string_ref, &FieldEntity::getNameRef > >, ordered_non_unique< tag< Ent_mi_tag >, const_mem_fun< FieldEntity, EntityHandle, &FieldEntity::getEnt > >, ordered_non_unique< tag< Composite_Name_And_Ent_mi_tag >, composite_key< FieldEntity, const_mem_fun< FieldEntity::interface_type_Field, boost::string_ref, &FieldEntity::getNameRef >, const_mem_fun< FieldEntity, EntityHandle, &FieldEntity::getEnt > > > > > FieldEntity_multiIndex
MultiIndex container keeps FieldEntity.
MoFEMErrorCode list_fields() const
list entities in the field
Definition: FieldCore.cpp:894
implementation of Data Operators for Forces and Sources
Definition: Common.hpp:21
static const MOFEMuuid IDD_MOFEMSimple
Definition: Simple.hpp:27
virtual const MoFEMErrorCode getFileVersion(moab::Interface &moab, Version &version) const
Get database major version.
FieldSpace in [ 0, LASTSPACE )
Definition: definitions.h:172
MoFEMErrorCode get_ref_finite_elements(const RefElement_multiIndex **refined_finite_elements_ptr) const
Get ref finite elements multi-index form database.
Definition: Core.cpp:683
MoFEMErrorCode getTags(int verb=-1)
get tags handlers used on meshsets
static MoFEMErrorCode Initialize(int *argc, char ***args, const char file[], const char help[])
Initializes the MoFEM database PETSc, MOAB and MPI.
Definition: Core.cpp:51
MoFEMErrorCode getTags(int verb=-1)
get tags handlers used on meshsets
MoFEMErrorCode addPrismToDatabase(const EntityHandle prism, int verb=DEFAULT_VERBOSITY)
add prim element
Definition: Core.cpp:236
MoFEMErrorCode clear_database(int verb=DEFAULT_VERBOSITY)
Clear database.
Definition: Core.cpp:465
Tag th_FieldId
Definition: Core.hpp:204
multi_index_container< boost::shared_ptr< DofEntity >, indexed_by< ordered_unique< tag< Unique_mi_tag >, const_mem_fun< DofEntity, UId, &DofEntity::getGlobalUniqueId > >, ordered_non_unique< tag< Composite_Ent_and_ShortId_mi_tag >, composite_key< DofEntity, const_mem_fun< DofEntity, EntityHandle, &DofEntity::getEnt >, const_mem_fun< DofEntity, ShortId, &DofEntity::getNonNonuniqueShortId > > >, ordered_non_unique< tag< Composite_Name_And_Ent_And_EntDofIdx_mi_tag >, composite_key< DofEntity, const_mem_fun< DofEntity::interface_type_Field, boost::string_ref, &DofEntity::getNameRef >, const_mem_fun< DofEntity, EntityHandle, &DofEntity::getEnt >, const_mem_fun< DofEntity, DofIdx, &DofEntity::getEntDofIdx > > >, ordered_non_unique< tag< Unique_Ent_mi_tag >, const_mem_fun< DofEntity, UId, &DofEntity::getEntGlobalUniqueId > >, ordered_non_unique< tag< FieldName_mi_tag >, const_mem_fun< DofEntity::interface_type_Field, boost::string_ref, &DofEntity::getNameRef > >, ordered_non_unique< tag< Ent_mi_tag >, const_mem_fun< DofEntity, EntityHandle, &DofEntity::getEnt > >, ordered_non_unique< tag< Composite_Name_And_Ent_mi_tag >, composite_key< DofEntity, const_mem_fun< DofEntity::interface_type_Field, boost::string_ref, &DofEntity::getNameRef >, const_mem_fun< DofEntity, EntityHandle, &DofEntity::getEnt > > >, ordered_non_unique< tag< Composite_Name_And_Type_mi_tag >, composite_key< DofEntity, const_mem_fun< DofEntity::interface_type_Field, boost::string_ref, &DofEntity::getNameRef >, const_mem_fun< DofEntity::interface_type_RefEntity, EntityType, &DofEntity::getEntType > > >, ordered_non_unique< tag< Composite_Name_Ent_Order_And_CoeffIdx_mi_tag >, composite_key< DofEntity, const_mem_fun< DofEntity::interface_type_Field, boost::string_ref, &DofEntity::getNameRef >, const_mem_fun< DofEntity, EntityHandle, &DofEntity::getEnt >, const_mem_fun< DofEntity, ApproximationOrder, &DofEntity::getDofOrder >, const_mem_fun< DofEntity, FieldCoefficientsNumber, &DofEntity::getDofCoeffIdx > > > > > DofEntity_multiIndex
MultiIndex container keeps DofEntity.
Tag th_RefBitEdge
Definition: Core.hpp:201
Tag th_ProblemName
Definition: Core.hpp:208
PetscBool initaliseAndBuildField
Definition: Core.hpp:920
Tag th_ProblemGhostNbDofCol
Definition: Core.hpp:211
std::bitset< BITREFLEVEL_SIZE > BitRefLevel
Bit structure attached to each entity identifying to what mesh entity is attached.
Definition: Common.hpp:147
static MoFEMErrorCodeGeneric< PetscErrorCode > ierr
Definition: Common.hpp:80
Tag th_ProblemId
Definition: Core.hpp:208
int rAnk
MOFEM communicator rank.
Definition: Core.hpp:867
Tag th_RefType
Definition: Core.hpp:203
Tag th_ProblemNbDofsRow
Definition: Core.hpp:209
MoFEMErrorCode initialiseDatabaseFromMesh(int verb=0)
MoFEMErrorCode getCoordSysPtr(const EntityHandle id, boost::shared_ptr< CoordSys > &cs_ptr)
get coordinate system by id
BitFEId getFEShift()
Return unique finite element Id.
Definition: Core.cpp:206
FieldApproximationBase
approximation base
Definition: definitions.h:140
static MoFEMErrorCodeGeneric< moab::ErrorCode > rval
Definition: Common.hpp:78
Tag th_ProblemGhostNbDofRow
Definition: Core.hpp:210
user adjacency function table
MoFEMErrorCode getTags(int verb=-1)
get tags handlers used on meshsets conating information about coordinate systems
static const MOFEMuuid IDD_MOFEMMeshRefine
MoFEMErrorCode getOptions(int verb=DEFAULT_VERBOSITY)
Get core options from command line.
Definition: Core.cpp:517
void macro_is_deprecated_using_deprecated_function()
Is used to indicate that macro is deprecated Do nothing just triggers error at the compilation...
Definition: Core.cpp:20
MoFEMErrorCode build_fields(int verb=DEFAULT_VERBOSITY)
Definition: FieldCore.cpp:863
int * buildMoFEM
keeps flags/semaphores for different stages
Definition: Core.hpp:915
CHKERRQ(ierr)
Tag th_FieldBase
Definition: Core.hpp:204
#define BITFIELDID_SIZE
max number of fields
Definition: definitions.h:277
FieldEntityEntFiniteElementAdjacencyMap_multiIndex entFEAdjacencies
adjacencies of elements to dofs
Definition: Core.hpp:255
InterfaceThis interface is used by user to:
Definition: Interface.hpp:42
Tag th_MoFEMBuild
Definition: Core.hpp:214
RefElement_multiIndex refinedFiniteElements
refined elements
Definition: Core.hpp:245
int * feShift
Ptr to tag handle storing last set bit in finite element ID.
Definition: Core.hpp:907
MeshsetsManager * get_meshsets_manager_ptr()
get MeshsetsManager pointer
Definition: Core.cpp:724
MoFEMErrorCode get_ref_ents(const RefEntity_multiIndex **refined_entities_ptr) const
Get ref entities multi-index from database.
Definition: Core.cpp:678
Tag th_ProblemLocalNbDofRow
Definition: Core.hpp:210
FiniteElement_multiIndex finiteElements
finite elements
Definition: Core.hpp:251
Problem_multiIndex pRoblems
problems multi-index
Definition: Core.hpp:257
MoFEMErrorCode getTags(int verb=DEFAULT_VERBOSITY)
Get tag handles.
Definition: Core.cpp:265
static const MOFEMuuid IDD_MOFEMTools
Definition: Tools.hpp:23
multi_index_container< Problem, indexed_by< ordered_unique< tag< Meshset_mi_tag >, member< Problem, EntityHandle, &Problem::meshset > >, hashed_unique< tag< BitProblemId_mi_tag >, const_mem_fun< Problem, BitProblemId, &Problem::getId >, HashBit< BitProblemId >, EqBit< BitProblemId > >, hashed_unique< tag< Problem_mi_tag >, const_mem_fun< Problem, std::string, &Problem::getName > > > > Problem_multiIndex
MultiIndex for entities for Problem.
Tag th_ProblemLocalNbDofCol
Definition: Core.hpp:211
static bool isGloballyInitialised
Core base globally initialized.
Definition: Core.hpp:916
MoFEMErrorCode list_problem() const
list problems
Tag th_FieldName
Definition: Core.hpp:204
FieldSpace
approximation spaces
Definition: definitions.h:165
Tag th_FEShift
Definition: Core.hpp:212
MoFEMErrorCode get_field_ents(const FieldEntity_multiIndex **field_ents) const
Get field multi index.
Definition: Core.cpp:713
static const MOFEMuuid IDD_MOFEMTetGegInterface
#define CHKERR
Inline error check.
Definition: definitions.h:578
PetscBool initaliseAndBuildFiniteElements
Definition: Core.hpp:923
Field_multiIndex fIelds
fields
Definition: Core.hpp:247
int * pShift
Ptr to tag handle storing last set bit in problem ID.
Definition: Core.hpp:908
static const MOFEMuuid IDD_MOFEMCutMesh
static const MOFEMuuid IDD_MOFEMCoordsSystemsManager
static char help[]
boost::shared_ptr< BasicEntityData > basicEntityDataPtr
Definition: Core.hpp:225
#define MYPCOMM_INDEX
default communicator number PCOMM
Definition: definitions.h:282
MoFEMErrorCode get_problem(const std::string &problem_name, const Problem **problem_ptr) const
Get problem database (data structure)
Definition: Core.cpp:690
static PetscErrorCode mofem_error_handler(MPI_Comm comm, int line, const char *fun, const char *file, PetscErrorCode n, PetscErrorType p, const char *mess, void *ctx)
multi_index_container< boost::shared_ptr< RefEntity >, indexed_by< ordered_unique< tag< Ent_mi_tag >, member< RefEntity::BasicEntity, EntityHandle, &RefEntity::ent > >, ordered_non_unique< tag< Ent_Ent_mi_tag >, const_mem_fun< RefEntity, EntityHandle, &RefEntity::getParentEnt > >, ordered_non_unique< tag< EntType_mi_tag >, const_mem_fun< RefEntity::BasicEntity, EntityType, &RefEntity::getEntType > >, ordered_non_unique< tag< ParentEntType_mi_tag >, const_mem_fun< RefEntity, EntityType, &RefEntity::getParentEntType > >, ordered_non_unique< tag< Composite_EntType_and_ParentEntType_mi_tag >, composite_key< RefEntity, const_mem_fun< RefEntity::BasicEntity, EntityType, &RefEntity::getEntType >, const_mem_fun< RefEntity, EntityType, &RefEntity::getParentEntType > > >, ordered_non_unique< tag< Composite_ParentEnt_And_EntType_mi_tag >, composite_key< RefEntity, const_mem_fun< RefEntity::BasicEntity, EntityType, &RefEntity::getEntType >, const_mem_fun< RefEntity, EntityHandle, &RefEntity::getParentEnt > > > > > RefEntity_multiIndex
MoFEMErrorCode get_problems(const Problem_multiIndex **problems_ptr) const
Get pointer to problems multi-index.
Definition: Core.cpp:706
MoFEMErrorCode set_field_order(const Range &ents, const BitFieldId id, const ApproximationOrder order, int verb=DEFAULT_VERBOSITY)
Definition: FieldCore.cpp:308
static const MOFEMuuid IDD_MOFEMFieldBlas
Definition: FieldBlas.hpp:26
MoFEMErrorCode get_dofs(const DofEntity_multiIndex **dofs_ptr) const
Get dofs multi index.
Definition: Core.cpp:718
Tag th_ProblemShift
Definition: Core.hpp:212
ParallelComm * pComm
MOAB communicator structure.
Definition: Core.hpp:864
int verbose
Verbosity level.
Definition: Core.hpp:904
Tag th_RefBitLevel_Mask
Definition: Core.hpp:201
Tag th_FEId
Definition: Core.hpp:206
MoFEMErrorCode initialiseDatabaseFromMesh(int verb=0)
boost::ptr_map< unsigned long, UnknownInterface > iFaces
Hash map of pointers to interfaces.
Definition: Core.hpp:913
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:403
static const MOFEMuuid IDD_MOFEMISManager
Definition: ISManager.hpp:26
std::string optionsPrefix
Prefix for options on command line.
Definition: Core.hpp:918
Tag th_RefBitLevel
Definition: Core.hpp:201
EntFiniteElement_multiIndex entsFiniteElements
finite element entities
Definition: Core.hpp:252
static const MOFEMuuid IDD_MOFEMDeprecatedCoreInterface
Definition: Interface.hpp:26
static const MOFEMuuid IDD_MOFEMPrismInterface
Tag th_FEIdData
Definition: Core.hpp:207
#define NOT_USED(x)
Definition: definitions.h:299
DEPRECATED IFace * query_interface() const
static const MOFEMuuid IDD_MOFEMMedInterface
BitFieldId getFieldShift()
Return unique field Id.
Definition: Core.cpp:194
static const MOFEMuuid IDD_MOFEMBitLevelCoupler
Tag th_FEIdRow
Definition: Core.hpp:207
static MoFEMErrorCode Finalize()
Checks for options to be called at the conclusion of the program.
Definition: Core.cpp:61