30 : comm(comm), isPetscComm(petsc) {
54constexpr const int CoreTmp<-1>::value;
60 if (type_index == boost::typeindex::type_id<CoreInterface>()) {
63 }
else if (type_index ==
64 boost::typeindex::type_id<DeprecatedCoreInterface>()) {
70 auto it = iFaces.find(type_index);
71 if (it != iFaces.end()) {
88 MPI_Initialized(&mpiInitialised);
92 PetscInitialized(&isInitialized);
93 if (isInitialized == PETSC_FALSE) {
94 PetscInitialize(argc,
args, file,
help);
101 isGloballyInitialised =
true;
104 char petsc_version[255];
105 CHKERR PetscGetVersion(petsc_version, 255);
106 MOFEM_LOG_C(
"WORLD", Sev::inform,
"MoFEM version %d.%d.%d (%s %s)",
107 MoFEM_VERSION_MAJOR, MoFEM_VERSION_MINOR, MoFEM_VERSION_BUILD,
108 MOAB_VERSION_STRING, petsc_version);
109 MOFEM_LOG_C(
"WORLD", Sev::inform,
"git commit id %s", GIT_SHA1_NAME);
111 auto log_time = [&](
const auto perefix,
auto time) {
113 << perefix << time.date().year() <<
"-" << time.date().month() <<
"-"
114 << time.date().day() <<
" " << time.time_of_day().hours() <<
":"
115 << time.time_of_day().minutes() <<
":" << time.time_of_day().seconds();
119 log_time(
"Local time: ", boost::posix_time::second_clock::local_time());
120 log_time(
"UTC time: ", boost::posix_time::second_clock::universal_time());
126 if (isGloballyInitialised) {
127 PetscPopErrorHandler();
128 isGloballyInitialised =
false;
130 if (isInitialized == PETSC_FALSE) {
131 PetscBool is_finalized;
132 PetscFinalized(&is_finalized);
137 if (!mpiInitialised) {
139 MPI_Finalized(&mpi_finalized);
152 ->
decltype(ptr->getSubInterfaceOptions()) {
153 return ptr->getSubInterfaceOptions();
165 CHKERR registerInterface<IFACE>(
true);
166 IFACE *ptr =
new IFACE(*
this);
174 auto get_sub_iface_options = [](
auto *
const ptr) {
177 CHKERR get_sub_iface_options(ptr);
179 auto type_idx = boost::typeindex::type_id<IFACE>();
180 iFaces.insert(type_idx, ptr);
185 MPI_Comm comm,
const int verbose) {
189 if (!isGloballyInitialised)
191 "MoFEM globally is not initialised, call MoFEM::Core::Initialize");
194 wrapMPIMOABComm = boost::make_shared<WrapMPIComm>(comm,
false);
196 MPI_Comm_size(mofemComm, &sIze);
197 MPI_Comm_rank(mofemComm, &rAnk);
200 ParallelComm *pComm = ParallelComm::get_pcomm(&moab,
MYPCOMM_INDEX);
202 pComm =
new ParallelComm(&moab, wrapMPIMOABComm->get_comm());
205 CHKERR registerInterface<UnknownInterface>();
206 CHKERR registerInterface<CoreInterface>();
207 CHKERR registerInterface<DeprecatedCoreInterface>();
210 PetscLogEventRegister(
"FE_preProcess", 0, &MOFEM_EVENT_preProcess);
211 PetscLogEventRegister(
"FE_operator", 0, &MOFEM_EVENT_operator);
212 PetscLogEventRegister(
"FE_postProcess", 0, &MOFEM_EVENT_postProcess);
213 PetscLogEventRegister(
"MoFEMCreateMat", 0, &MOFEM_EVENT_createMat);
230 ierr = this->registerSubInterfaces();
231 CHKERRABORT(comm,
ierr);
232 ierr = this->clearMap();
233 CHKERRABORT(comm,
ierr);
234 ierr = this->getTags();
235 CHKERRABORT(comm,
ierr);
236 ierr = this->getOptions(verbose);
237 CHKERRABORT(comm,
ierr);
239 this->basicEntityDataPtr = boost::make_shared<BasicEntityData>(moab);
240 setRefEntBasicDataPtr(*
this, this->basicEntityDataPtr);
242 ierr = this->initialiseDatabaseFromMesh(verbose);
243 CHKERRABORT(comm,
ierr);
254 ierr = this->registerSubInterfaces();
255 CHKERRABORT(comm,
ierr);
256 ierr = this->clearMap();
257 CHKERRABORT(comm,
ierr);
258 ierr = this->getTags();
259 CHKERRABORT(comm,
ierr);
260 ierr = this->getOptions(verbose);
261 CHKERRABORT(comm,
ierr);
263 this->basicEntityDataPtr = boost::make_shared<BasicEntityData>(moab);
264 setRefEntBasicDataPtr(*
this, this->basicEntityDataPtr);
266 ierr = this->initialiseDatabaseFromMesh(verbose);
267 CHKERRABORT(comm,
ierr);
271 PetscBool is_finalized;
272 PetscFinalized(&is_finalized);
276 if (isGloballyInitialised && is_finalized) {
277 isGloballyInitialised =
false;
287 Range ref_elems_to_add;
289 auto m_moab = &get_moab();
293 CHKERR get_moab().get_entities_by_type(0, MBENTITYSET, meshsets,
false);
294 Range special_meshsets;
295 for (
auto mit : meshsets) {
298 CHKERR get_moab().tag_get_data(th_FieldId, &mit, 1, &field_id);
302 const void *tag_name;
304 CHKERR get_moab().tag_get_by_ptr(
305 th_FieldName, &mit, 1, (
const void **)&tag_name, &tag_name_size);
310 << boost::string_ref((
char *)tag_name, tag_name_size);
312 auto p = fIelds.insert(boost::make_shared<Field>(moab, mit));
318 CHKERR get_moab().get_entities_by_handle(mit, ents,
true);
319 CHKERR get_moab().add_entities((*
p.first)->getMeshset(), ents);
320 CHKERR get_moab().delete_entities(&mit, 1);
322 special_meshsets.insert(mit);
328 CHKERR get_moab().tag_get_data(th_FEId, &mit, 1, &fe_id);
331 std::pair<FiniteElement_multiIndex::iterator, bool>
p =
332 finiteElements.insert(
333 boost::shared_ptr<FiniteElement>(
new FiniteElement(moab, mit)));
335 MOFEM_LOG(
"WORLD", Sev::verbose) <<
"Read finite element " << **
p.first;
338 CHKERR get_moab().get_entities_by_type(mit, MBENTITYSET, ents,
false);
339 CHKERR get_moab().get_entities_by_handle(mit, ents,
true);
340 ref_elems_to_add.merge(ents);
344 CHKERR get_moab().add_entities((*
p.first)->getMeshset(), ents);
345 CHKERR get_moab().delete_entities(&mit, 1);
347 special_meshsets.insert(mit);
352 CHKERR get_moab().tag_get_data(th_ProblemId, &mit, 1, &problem_id);
354 if (problem_id != 0) {
355 std::pair<Problem_multiIndex::iterator, bool>
p =
356 pRoblems.insert(
Problem(moab, mit));
358 MOFEM_LOG(
"WORLD", Sev::verbose) <<
"Read problem " << *
p.first;
360 <<
"\tBitRef " <<
p.first->getBitRefLevel() <<
" BitMask "
361 <<
p.first->getBitRefLevelMask();
368 CHKERR get_moab().get_entities_by_handle(mit, ents,
true);
369 CHKERR get_moab().get_entities_by_type(mit, MBENTITYSET, ents,
true);
370 CHKERR get_moab().add_entities(
p.first->meshset, ents);
371 CHKERR get_moab().delete_entities(&mit, 1);
373 special_meshsets.insert(mit);
380 CHKERR get_moab().get_entities_by_handle(0, bit_ref_ents,
false);
381 bit_ref_ents = subtract(bit_ref_ents, special_meshsets);
382 CHKERR getInterface<BitRefManager>()->filterEntitiesByRefLevel(
384 CHKERR getInterface<BitRefManager>()->setEntitiesBitRefLevel(bit_ref_ents);
385 CHKERR getInterface<BitRefManager>()->setElementsBitRefLevel(
389 for (
auto field : fIelds) {
390 if (field->getSpace() !=
NOSPACE) {
391 Range ents_of_id_meshset;
392 CHKERR get_moab().get_entities_by_handle(field->getMeshset(),
393 ents_of_id_meshset,
false);
394 CHKERR set_field_order(ents_of_id_meshset, field->getId(), -1, verb);
398 if (initaliseAndBuildField || initaliseAndBuildFiniteElements) {
399 CHKERR build_fields(verb);
400 if (initaliseAndBuildFiniteElements) {
401 CHKERR build_finite_elements(verb);
407 list_finite_elements();
413 CHKERR getInterface(m_manger_ptr);
416 CHKERR getInterface(series_recorder_ptr);
431 moab = std::ref(new_moab);
434 ParallelComm *pComm = ParallelComm::get_pcomm(&new_moab,
MYPCOMM_INDEX);
436 pComm =
new ParallelComm(&new_moab, wrapMPIMOABComm->get_comm());
443 basicEntityDataPtr = boost::make_shared<BasicEntityData>(moab);
444 setRefEntBasicDataPtr(*
this, this->basicEntityDataPtr);
447 CHKERR this->initialiseDatabaseFromMesh(verb);
458 CHKERR regSubInterface<LogManager>();
459 CHKERR regSubInterface<Simple>();
460 CHKERR regSubInterface<PipelineManager>();
461 CHKERR regSubInterface<ProblemsManager>();
462 CHKERR regSubInterface<MatrixManager>();
463 CHKERR regSubInterface<ISManager>();
464 CHKERR regSubInterface<VecManager>();
465 CHKERR regSubInterface<FieldBlas>();
466 CHKERR regSubInterface<BitRefManager>();
467 CHKERR regSubInterface<Tools>();
468 CHKERR regSubInterface<CommInterface>();
469 CHKERR regSubInterface<MeshsetsManager>();
470 CHKERR regSubInterface<NodeMergerInterface>();
471 CHKERR regSubInterface<PrismsFromSurfaceInterface>();
472 CHKERR regSubInterface<MeshRefinement>();
473 CHKERR regSubInterface<PrismInterface>();
474 CHKERR regSubInterface<CutMeshInterface>();
475 CHKERR regSubInterface<SeriesRecorder>();
477 CHKERR regSubInterface<TetGenInterface>();
480 CHKERR regSubInterface<MedInterface>();
482 CHKERR regSubInterface<FieldEvaluatorInterface>();
483 CHKERR regSubInterface<BcManager>();
491 CHKERR getInterface<SeriesRecorder>()->clearMap();
492 CHKERR getInterface<MeshsetsManager>()->clearMap();
493 CHKERR getInterface<CutMeshInterface>()->clearMap();
495 refinedEntities.clear();
496 refinedFiniteElements.clear();
500 finiteElements.clear();
501 entsFiniteElements.clear();
502 entFEAdjacencies.clear();
511 std::pair<RefEntity_multiIndex::iterator, bool> p_ent;
512 p_ent = refinedEntities.insert(
513 boost::make_shared<RefEntity>(basicEntityDataPtr, prism));
515 std::pair<RefElement_multiIndex::iterator, bool>
p;
516 p = refinedFiniteElements.insert(
519 const EntityHandle *conn;
520 CHKERR get_moab().get_connectivity(prism, conn, num_nodes,
true);
521 Range face_side3, face_side4;
522 CHKERR get_moab().get_adjacencies(conn, 3, 2,
false, face_side3);
523 CHKERR get_moab().get_adjacencies(&conn[3], 3, 2,
false, face_side4);
524 if (face_side3.size() != 1)
526 "prism don't have side face 3");
527 if (face_side4.size() != 1)
529 "prims don't have side face 4");
530 p.first->get()->getSideNumberPtr(*face_side3.begin());
531 p.first->get()->getSideNumberPtr(*face_side4.begin());
539 const EntityHandle root_meshset = get_moab().get_root_set();
542 "Root meshset should be 0");
548 CHKERR getFileVersion(moab, version);
554 auto check_tag_allocated = [](
auto &
rval) {
556 if (
rval == MB_ALREADY_ALLOCATED)
565 rval = get_moab().tag_get_handle(
"_MoFEMBuild", 1, MB_TYPE_INTEGER,
566 th_MoFEMBuild, MB_TAG_CREAT | MB_TAG_MESH,
570 CHKERR get_moab().tag_get_by_ptr(th_MoFEMBuild, &root_meshset, 1,
571 (
const void **)&buildMoFEM);
576 const int def_part = -1;
577 CHKERR get_moab().tag_get_handle(
"PARTITION", 1, MB_TYPE_INTEGER, th_Part,
578 MB_TAG_CREAT | MB_TAG_SPARSE, &def_part);
583 const int def_part = -1;
584 CHKERR get_moab().tag_get_handle(
"_MeshsetPartition", 1, MB_TYPE_INTEGER,
585 th_Part, MB_TAG_CREAT | MB_TAG_SPARSE,
587 EntityHandle def_handle = 0;
588 CHKERR get_moab().tag_get_handle(
"_RefParentHandle", 1, MB_TYPE_HANDLE,
590 MB_TAG_CREAT | MB_TAG_SPARSE, &def_handle);
592 CHKERR get_moab().tag_get_handle(
593 "_RefBitLevel",
sizeof(
BitRefLevel), MB_TYPE_OPAQUE, th_RefBitLevel,
594 MB_TAG_CREAT | MB_TAG_BYTES | MB_TAG_SPARSE, &def_bit_level);
596 CHKERR get_moab().tag_get_handle(
597 "_RefBitLevelMask",
sizeof(
BitRefLevel), MB_TYPE_OPAQUE,
598 th_RefBitLevel_Mask, MB_TAG_CREAT | MB_TAG_BYTES | MB_TAG_SPARSE,
599 &def_bit_level_mask);
601 CHKERR get_moab().tag_get_handle(
602 "_RefBitEdge",
sizeof(
BitRefEdges), MB_TYPE_OPAQUE, th_RefBitEdge,
603 MB_TAG_CREAT | MB_TAG_SPARSE | MB_TAG_BYTES, &def_bit_edge);
604 const int def_type[] = {0, 0};
605 CHKERR get_moab().tag_get_handle(
"_RefType", 2, MB_TYPE_INTEGER, th_RefType,
606 MB_TAG_CREAT | MB_TAG_SPARSE, def_type);
611 const unsigned long int def_id = 0;
612 CHKERR get_moab().tag_get_handle(
613 "_FieldId",
sizeof(
BitFieldId), MB_TYPE_OPAQUE, th_FieldId,
614 MB_TAG_CREAT | MB_TAG_BYTES | MB_TAG_SPARSE, &def_id);
616 CHKERR get_moab().tag_get_handle(
617 "_FieldSpace",
sizeof(
FieldSpace), MB_TYPE_OPAQUE, th_FieldSpace,
618 MB_TAG_CREAT | MB_TAG_BYTES | MB_TAG_SPARSE, &def_space);
620 CHKERR get_moab().tag_get_handle(
622 th_FieldBase, MB_TAG_CREAT | MB_TAG_BYTES | MB_TAG_SPARSE, &def_base);
623 const int def_val_len = 0;
624 CHKERR get_moab().tag_get_handle(
625 "_FieldName", def_val_len, MB_TYPE_OPAQUE, th_FieldName,
626 MB_TAG_CREAT | MB_TAG_BYTES | MB_TAG_VARLEN | MB_TAG_SPARSE, NULL);
627 CHKERR get_moab().tag_get_handle(
628 "_FieldName_DataNamePrefix", def_val_len, MB_TYPE_OPAQUE,
629 th_FieldName_DataNamePrefix,
630 MB_TAG_CREAT | MB_TAG_BYTES | MB_TAG_VARLEN | MB_TAG_SPARSE, NULL);
635 const unsigned long int def_id = 0;
636 const int def_val_len = 0;
637 CHKERR get_moab().tag_get_handle(
638 "_FEId",
sizeof(
BitFEId), MB_TYPE_OPAQUE, th_FEId,
639 MB_TAG_CREAT | MB_TAG_BYTES | MB_TAG_SPARSE, &def_id);
640 CHKERR get_moab().tag_get_handle(
641 "_FEName", def_val_len, MB_TYPE_OPAQUE, th_FEName,
642 MB_TAG_CREAT | MB_TAG_BYTES | MB_TAG_VARLEN | MB_TAG_SPARSE, NULL);
643 CHKERR get_moab().tag_get_handle(
644 "_FEIdCol",
sizeof(
BitFieldId), MB_TYPE_OPAQUE, th_FEIdCol,
645 MB_TAG_CREAT | MB_TAG_BYTES | MB_TAG_SPARSE, &def_id);
646 CHKERR get_moab().tag_get_handle(
647 "_FEIdRow",
sizeof(
BitFieldId), MB_TYPE_OPAQUE, th_FEIdRow,
648 MB_TAG_CREAT | MB_TAG_BYTES | MB_TAG_SPARSE, &def_id);
649 CHKERR get_moab().tag_get_handle(
650 "_FEIdData",
sizeof(
BitFieldId), MB_TYPE_OPAQUE, th_FEIdData,
651 MB_TAG_CREAT | MB_TAG_BYTES | MB_TAG_SPARSE, &def_id);
656 const unsigned long int def_id = 0;
657 const int def_val_len = 0;
658 CHKERR get_moab().tag_get_handle(
659 "_ProblemId",
sizeof(
BitProblemId), MB_TYPE_OPAQUE, th_ProblemId,
660 MB_TAG_CREAT | MB_TAG_BYTES | MB_TAG_SPARSE, &def_id);
661 CHKERR get_moab().tag_get_handle(
662 "_ProblemFEId",
sizeof(
BitFEId), MB_TYPE_OPAQUE, th_ProblemFEId,
663 MB_TAG_CREAT | MB_TAG_BYTES | MB_TAG_SPARSE, &def_id);
664 CHKERR get_moab().tag_get_handle(
665 "_ProblemName", def_val_len, MB_TYPE_OPAQUE, th_ProblemName,
666 MB_TAG_CREAT | MB_TAG_BYTES | MB_TAG_VARLEN | MB_TAG_SPARSE, NULL);
668 CHKERR get_moab().tag_get_handle(
669 "_ProblemNbDofsRow",
sizeof(
DofIdx), MB_TYPE_OPAQUE,
670 th_ProblemNbDofsRow, MB_TAG_CREAT | MB_TAG_BYTES | MB_TAG_SPARSE,
672 CHKERR get_moab().tag_get_handle(
673 "_ProblemNbDofsCol",
sizeof(
DofIdx), MB_TYPE_OPAQUE,
674 th_ProblemNbDofsCol, MB_TAG_CREAT | MB_TAG_BYTES | MB_TAG_SPARSE,
676 CHKERR get_moab().tag_get_handle(
677 "_ProblemLocalNbDofsRow",
sizeof(
DofIdx), MB_TYPE_OPAQUE,
678 th_ProblemLocalNbDofRow, MB_TAG_CREAT | MB_TAG_BYTES | MB_TAG_SPARSE,
680 CHKERR get_moab().tag_get_handle(
681 "_ProblemGhostNbDofsRow",
sizeof(
DofIdx), MB_TYPE_OPAQUE,
682 th_ProblemGhostNbDofRow, MB_TAG_CREAT | MB_TAG_BYTES | MB_TAG_SPARSE,
684 CHKERR get_moab().tag_get_handle(
685 "_ProblemLocalNbDofsCol",
sizeof(
DofIdx), MB_TYPE_OPAQUE,
686 th_ProblemLocalNbDofCol, MB_TAG_CREAT | MB_TAG_BYTES | MB_TAG_SPARSE,
688 CHKERR get_moab().tag_get_handle(
689 "_ProblemGhostNbDofsCol",
sizeof(
DofIdx), MB_TYPE_OPAQUE,
690 th_ProblemGhostNbDofCol, MB_TAG_CREAT | MB_TAG_BYTES | MB_TAG_SPARSE,
696 CHKERR getInterface(meshsets_manager_ptr);
701 CHKERR getInterface(series_recorder_ptr);
720 CHKERR this->getTags(verb);
721 CHKERR this->initialiseDatabaseFromMesh(verb);
726 return this->setMoabInterface(new_moab, verb);
731 return this->setMoabInterface(new_moab, verb);
739 CHKERR PetscOptionsBegin(mofemComm, optionsPrefix.c_str(),
"Mesh cut options",
740 "See MoFEM documentation");
743 "-mofem_init_fields",
"Initialise fields on construction",
"",
744 initaliseAndBuildField, &initaliseAndBuildField, NULL);
747 "-mofem_init_fields",
"Initialise fields on construction",
"",
748 initaliseAndBuildFiniteElements, &initaliseAndBuildFiniteElements, NULL);
753 ierr = PetscOptionsEnd();
763 *fields_ptr = &fIelds;
770 *refined_entities_ptr = &refinedEntities;
776 *refined_finite_elements_ptr = &refinedFiniteElements;
781 const Problem **problem_ptr)
const {
785 ProblemsByName::iterator p_miit = problems.find(problem_name);
786 if (p_miit == problems.end()) {
788 "problem < %s > not found, (top tip: check spelling)",
789 problem_name.c_str());
791 *problem_ptr = &*p_miit;
798 *problems_ptr = &pRoblems;
805 *field_ents = &entsFields;
810 *dofs_ptr = &dofsField;
817 *fe_ptr = &finiteElements;
824 *fe_ent_ptr = &entsFiniteElements;
830 getInterface(meshsets_manager_ptr);
831 return meshsets_manager_ptr;
836 getInterface(meshsets_manager_ptr);
837 return meshsets_manager_ptr;
842 *dofs_elements_adjacency)
const {
844 *dofs_elements_adjacency = &entFEAdjacencies;
850 return &entFEAdjacencies;
855 return &refinedEntities;
858 return &refinedFiniteElements;
861 return &finiteElements;
864 return &entsFiniteElements;
873 "Problem of given name not found");
878template <
int V,
typename std::enable_if<(V >= 0),
int>
::type * =
nullptr>
883template <
int V,
typename std::enable_if<(V < 0),
int>::type * =
nullptr>
884void set_ref_ent_basic_data_ptr_impl(boost::shared_ptr<BasicEntityData> &ptr) {
888void Core::setRefEntBasicDataPtr(MoFEM::Interface &m_field,
889 boost::shared_ptr<BasicEntityData> &ptr) {
891 switch (m_field.getValue()) {
893 set_ref_ent_basic_data_ptr_impl<-1>(ptr);
896 set_ref_ent_basic_data_ptr_impl<0>(ptr);
899 set_ref_ent_basic_data_ptr_impl<1>(ptr);
902 THROW_MESSAGE("Core index can vary from -1 to MAX_CORE_TMP");
906boost::shared_ptr<RefEntityTmp<0>>
907Core::makeSharedRefEntity(MoFEM::Interface &m_field, const EntityHandle ent) {
909 boost::shared_ptr<RefEntityTmp<0>> ref_ent_ptr;
911 switch (m_field.getValue()) {
913 ref_ent_ptr = boost::shared_ptr<RefEntityTmp<0>>(
915 new RefEntityTmp<-1>(m_field.get_basic_entity_data_ptr(), ent)
920 ref_ent_ptr = boost::shared_ptr<RefEntityTmp<0>>(
922 new RefEntityTmp<0>(m_field.get_basic_entity_data_ptr(), ent)
927 ref_ent_ptr = boost::shared_ptr<RefEntityTmp<0>>(
929 new RefEntityTmp<1>(m_field.get_basic_entity_data_ptr(), ent)
934 THROW_MESSAGE("Core index can vary from -1 to MAX_CORE_TMP");
940boost::shared_ptr<RefEntityTmp<0>>
941Core::make_shared_ref_entity(const EntityHandle ent) {
942 return this->makeSharedRefEntity(*
this, ent);
945boost::shared_ptr<RefEntityTmp<0>>
947 return this->makeSharedRefEntity(*
this, ent);
multi_index_container< FieldEntityEntFiniteElementAdjacencyMap, indexed_by< ordered_unique< tag< Composite_Unique_mi_tag >, composite_key< FieldEntityEntFiniteElementAdjacencyMap, const_mem_fun< FieldEntityEntFiniteElementAdjacencyMap, UId, &FieldEntityEntFiniteElementAdjacencyMap::getEntUniqueId >, const_mem_fun< FieldEntityEntFiniteElementAdjacencyMap, UId, &FieldEntityEntFiniteElementAdjacencyMap::getFeUniqueId > > >, ordered_non_unique< tag< Unique_mi_tag >, const_mem_fun< FieldEntityEntFiniteElementAdjacencyMap, UId, &FieldEntityEntFiniteElementAdjacencyMap::getEntUniqueId > >, ordered_non_unique< tag< FE_Unique_mi_tag >, const_mem_fun< FieldEntityEntFiniteElementAdjacencyMap, UId, &FieldEntityEntFiniteElementAdjacencyMap::getFeUniqueId > >, ordered_non_unique< tag< FEEnt_mi_tag >, const_mem_fun< FieldEntityEntFiniteElementAdjacencyMap, EntityHandle, &FieldEntityEntFiniteElementAdjacencyMap::getFeHandle > >, ordered_non_unique< tag< Ent_mi_tag >, const_mem_fun< FieldEntityEntFiniteElementAdjacencyMap, EntityHandle, &FieldEntityEntFiniteElementAdjacencyMap::getEntHandle > > > > FieldEntityEntFiniteElementAdjacencyMap_multiIndex
MultiIndex container keeps Adjacencies Element and dof entities adjacencies and vice versa.
void macro_is_deprecated_using_deprecated_function()
Is used to indicate that macro is deprecated Do nothing just triggers error at the compilation.
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< 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.
#define MOFEM_LOG_C(channel, severity, format,...)
FieldApproximationBase
approximation base
#define CHK_THROW_MESSAGE(err, msg)
Check and throw MoFEM exception.
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
FieldSpace
approximation spaces
@ LASTSPACE
FieldSpace in [ 0, LASTSPACE )
#define MYPCOMM_INDEX
default communicator number PCOMM
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
#define CHKERRG(n)
Check error code of MoFEM/MOAB/PETSc function.
@ MOFEM_OPERATION_UNSUCCESSFUL
@ MOFEM_DATA_INCONSISTENCY
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
#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.
multi_index_container< boost::shared_ptr< DofEntity >, indexed_by< ordered_unique< tag< Unique_mi_tag >, const_mem_fun< DofEntity, UId, &DofEntity::getLocalUniqueId > >, ordered_non_unique< tag< Ent_mi_tag >, const_mem_fun< DofEntity, EntityHandle, &DofEntity::getEnt > > > > DofEntity_multiIndex
MultiIndex container keeps DofEntity.
multi_index_container< boost::shared_ptr< RefEntity >, indexed_by< ordered_unique< tag< Ent_mi_tag >, const_mem_fun< RefEntity, EntityHandle, &RefEntity::getEnt > >, ordered_non_unique< tag< Ent_Ent_mi_tag >, const_mem_fun< RefEntity, EntityHandle, &RefEntity::getParentEnt > >, ordered_non_unique< tag< Composite_EntType_and_ParentEntType_mi_tag >, composite_key< RefEntity, const_mem_fun< RefEntity, 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, EntityType, &RefEntity::getEntType >, const_mem_fun< RefEntity, EntityHandle, &RefEntity::getParentEnt > > > > > RefEntity_multiIndex
multi_index_container< boost::shared_ptr< RefElement >, indexed_by< ordered_unique< tag< Ent_mi_tag >, const_mem_fun< RefElement::interface_type_RefEntity, EntityHandle, &RefElement::getEnt > > > > RefElement_multiIndex
multi_index_container< boost::shared_ptr< EntFiniteElement >, indexed_by< ordered_unique< tag< Unique_mi_tag >, const_mem_fun< EntFiniteElement, UId, &EntFiniteElement::getLocalUniqueId > >, ordered_non_unique< tag< Ent_mi_tag >, const_mem_fun< EntFiniteElement::interface_type_RefEntity, EntityHandle, &EntFiniteElement::getEnt > >, ordered_non_unique< tag< FiniteElement_name_mi_tag >, const_mem_fun< EntFiniteElement::interface_type_FiniteElement, boost::string_ref, &EntFiniteElement::getNameRef > >, ordered_non_unique< tag< Composite_Name_And_Ent_mi_tag >, composite_key< EntFiniteElement, const_mem_fun< EntFiniteElement::interface_type_FiniteElement, boost::string_ref, &EntFiniteElement::getNameRef >, const_mem_fun< EntFiniteElement::interface_type_RefEntity, EntityHandle, &EntFiniteElement::getEnt > > > > > EntFiniteElement_multiIndex
MultiIndex container for EntFiniteElement.
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.
multi_index_container< boost::shared_ptr< FiniteElement >, indexed_by< hashed_unique< tag< FiniteElement_Meshset_mi_tag >, member< FiniteElement, EntityHandle, &FiniteElement::meshset > >, hashed_unique< tag< BitFEId_mi_tag >, const_mem_fun< FiniteElement, BitFEId, &FiniteElement::getId >, HashBit< BitFEId >, EqBit< BitFEId > >, ordered_unique< tag< FiniteElement_name_mi_tag >, const_mem_fun< FiniteElement, boost::string_ref, &FiniteElement::getNameRef > > > > FiniteElement_multiIndex
MultiIndex for entities for FiniteElement.
#define MOFEM_LOG(channel, severity)
Log.
#define MOFEM_LOG_CHANNEL(channel)
Set and reset channel.
static MoFEMErrorCodeGeneric< PetscErrorCode > ierr
static MoFEMErrorCodeGeneric< moab::ErrorCode > rval
PetscErrorCode MoFEMErrorCode
MoFEM/PETSc error code.
std::bitset< BITFEID_SIZE > BitFEId
Finite element Id.
std::bitset< BITPROBLEMID_SIZE > BitProblemId
Problem Id.
std::bitset< BITFIELDID_SIZE > BitFieldId
Field Id.
std::bitset< BITREFEDGES_SIZE > BitRefEdges
std::bitset< BITREFLEVEL_SIZE > BitRefLevel
Bit structure attached to each entity identifying to what mesh entity is attached.
implementation of Data Operators for Forces and Sources
static auto get_sub_iface_options_imp(T *const ptr, int) -> decltype(ptr->getSubInterfaceOptions())
void set_ref_ent_basic_data_ptr_impl(boost::shared_ptr< BasicEntityData > &ptr)
DeprecatedCoreInterface Interface
multi_index_container< boost::shared_ptr< FieldEntity >, indexed_by< ordered_unique< tag< Unique_mi_tag >, member< FieldEntity, UId, &FieldEntity::localUId > >, ordered_non_unique< tag< Ent_mi_tag >, const_mem_fun< FieldEntity::interface_type_RefEntity, EntityHandle, &FieldEntity::getEnt > > > > FieldEntity_multiIndex
MoFEMErrorCode clearMap()
Cleaning database.
MoFEMErrorCode query_interface(boost::typeindex::type_index type_index, UnknownInterface **iface) const
Getting interface of core database.
static MoFEMErrorCode Initialize(int *argc, char ***args, const char file[], const char help[])
Initializes the MoFEM database PETSc, MOAB and MPI.
MoFEMErrorCode regSubInterface()
Register subinterfac in core interface.
static bool isGloballyInitialised
Core base globally initialized.
const RefElement_multiIndex * get_ref_finite_elements() const
Get the ref finite elements object.
const FieldEntity_multiIndex * get_field_ents() const
Get the field ents object.
MoFEMErrorCode initialiseDatabaseFromMesh(int verb=DEFAULT_VERBOSITY)
Initialize database getting information on mesh.
MoFEMErrorCode registerSubInterfaces()
Register insterfaces.
const Field_multiIndex * get_fields() const
Get the fields object.
const Problem_multiIndex * get_problems() const
Get the problems object.
MoFEMErrorCode coreGenericConstructor(moab::Interface &moab, MPI_Comm comm, const int verbose)
const DofEntity_multiIndex * get_dofs() const
Get the dofs object.
MoFEMErrorCode getOptions(int verb=DEFAULT_VERBOSITY)
Get core options from command line.
static PetscBool isInitialized
petsc was initialised by other agent
const RefEntity_multiIndex * get_ref_ents() const
Get the ref ents object.
const FieldEntityEntFiniteElementAdjacencyMap_multiIndex * get_ents_elements_adjacency() const
Get the dofs elements adjacency object.
const EntFiniteElement_multiIndex * get_ents_finite_elements() const
Get the ents finite elements object.
const FiniteElement_multiIndex * get_finite_elements() const
Get the finite elements object.
MoFEMErrorCode addPrismToDatabase(const EntityHandle prism, int verb=DEFAULT_VERBOSITY)
add prim element
static MoFEMErrorCode Finalize()
Checks for options to be called at the conclusion of the program.
MoFEMErrorCode set_moab_interface(moab::Interface &new_moab, int verb=VERBOSE)
Set the moab interface object.
MoFEMErrorCode setMoabInterface(moab::Interface &new_moab, int verb=VERBOSE)
MoFEMErrorCode get_problem(const std::string &problem_name, const Problem **problem_ptr) const
Get problem database (data structure)
MoFEMErrorCode getTags(int verb=DEFAULT_VERBOSITY)
Get tag handles.
CoreTmp(moab::Interface &moab, MPI_Comm comm=PETSC_COMM_WORLD, const int verbose=VERBOSE)
static int mpiInitialised
mpi was initialised by other agent
MeshsetsManager * get_meshsets_manager_ptr()
get MeshsetsManager pointer
MoFEMErrorCode rebuild_database(int verb=DEFAULT_VERBOSITY)
Clear database and initialize it once again.
MoFEMErrorCode clear_database(int verb=DEFAULT_VERBOSITY)
Clear database.
MoFEMErrorCode set_moab_interface(moab::Interface &new_moab, int verb)
CoreTmp(moab::Interface &moab, MPI_Comm comm=PETSC_COMM_WORLD, const int verbose=VERBOSE)
Deprecated interface functions.
Finite element definition.
static MoFEMErrorCode getOptions()
Get logger option.
static void createDefaultSinks(MPI_Comm comm)
Create default sinks.
static PetscErrorCode logPetscFPrintf(FILE *fd, const char format[], va_list Argp)
Use to handle PETSc output.
Interface for managing meshsets containing materials and boundary conditions.
MoFEMErrorCode initialiseDatabaseFromMesh(int verb=DEFAULT_VERBOSITY)
MoFEMErrorCode getTags(int verb=-1)
get tags handlers used on meshsets
keeps basic data about problem
keeps data about abstract PRISM finite element
MoFEMErrorCode getTags(int verb=-1)
get tags handlers used on meshsets
MoFEMErrorCode initialiseDatabaseFromMesh(int verb=0)
base class for all interface classes
WrapMPIComm(MPI_Comm comm, bool petsc)