26 struct MeshsetsManager;
32 static constexpr
const int value =
N;
36 const EntityHandle ent);
44 MPI_Comm comm = PETSC_COMM_WORLD,
85 virtual boost::shared_ptr<RefEntityTmp<0>>
92 MPI_Comm comm = PETSC_COMM_WORLD,
166 boost::shared_ptr<BasicEntityData> &ptr);
168 static boost::shared_ptr<RefEntityTmp<0>>
208 BUILD_FIELD = 1 << 0,
211 BUILD_PROBLEM = 1 << 3,
212 PARTITION_PROBLEM = 1 << 4,
213 PARTITION_FE = 1 << 5,
214 PARTITION_GHOST_DOFS = 1 << 6,
215 PARTITION_MESH = 1 << 7
257 Tag
th_FieldId, th_FieldName, th_FieldName_DataNamePrefix, th_FieldSpace,
288 return basicEntityDataPtr;
318 std::reference_wrapper<moab::Interface>
moab;
335 check_number_of_ents_in_ents_field(
const std::string &name)
const;
338 check_number_of_ents_in_ents_finite_element(
const std::string &name)
const;
339 MoFEMErrorCode check_number_of_ents_in_ents_finite_element()
const;
359 return *get_meshsets_manager_ptr();
362 return *get_meshsets_manager_ptr();
388 const bool remove_parent =
false,
421 add_field(
const std::string &name,
const FieldSpace space,
424 const TagType tag_type = MB_TAG_SPARSE,
454 const TagType tag_type,
const enum MoFEMTypes bh,
458 const std::string &name,
461 const std::string &name,
464 const EntityType
type,
465 const std::string &name,
467 MoFEMErrorCode add_ents_to_field_by_dim(
const EntityHandle meshset,
469 const std::string &name,
470 const bool recursive =
true,
472 MoFEMErrorCode add_ents_to_field_by_type(
const EntityHandle meshset,
473 const EntityType
type,
474 const std::string &name,
475 const bool recursive =
true,
478 MoFEMErrorCode create_vertices_and_add_to_field(
const std::string name,
479 const double coords[],
488 MoFEMErrorCode setFieldOrderImpl(boost::shared_ptr<Field> field_ptr,
500 MoFEMErrorCode set_field_order(
const Range &ents,
const std::string &name,
504 const EntityType
type,
const std::string &name,
519 buildFieldForNoFieldImpl(boost::shared_ptr<Field> field_ptr,
520 std::map<EntityType, int> &dof_counter,
int verb);
523 std::map<EntityType, int> &dof_counter,
527 buildFieldForL2H1HcurlHdiv(
const BitFieldId id,
528 std::map<EntityType, int> &dof_counter,
529 std::map<EntityType, int> &inactive_dof_counter,
547 MoFEMErrorCode clear_dofs_fields(
const std::string name,
const Range ents,
556 MoFEMErrorCode clear_ents_fields(
const std::string name,
const Range ents,
562 remove_ents_from_field_by_bit_ref(
const BitRefLevel bit,
566 const EntityHandle meshset,
567 const EntityType
type,
577 MoFEMErrorCode list_dofs_by_field_name(
const std::string &name)
const;
579 BitFieldId getBitFieldId(
const std::string &name)
const;
580 FieldBitNumber get_field_bit_number(
const std::string name)
const;
581 EntityHandle get_field_meshset(
const BitFieldId id)
const;
582 EntityHandle get_field_meshset(
const std::string name)
const;
583 MoFEMErrorCode get_field_entities_by_dimension(
const std::string name,
584 int dim, Range &ents)
const;
586 EntityType
type, Range &ents)
const;
587 MoFEMErrorCode get_field_entities_by_handle(
const std::string name,
589 bool check_field(
const std::string &name)
const;
590 const Field *get_field_structure(
const std::string &name);
598 bool check_finite_element(
const std::string &name)
const;
603 modify_finite_element_adjacency_table(
const std::string &fe_name,
604 const EntityType
type,
607 modify_finite_element_add_field_data(
const std::string &fe_name,
608 const std::string &name_filed);
610 modify_finite_element_add_field_row(
const std::string &fe_name,
611 const std::string &name_row);
613 modify_finite_element_add_field_col(
const std::string &fe_name,
614 const std::string &name_col);
616 modify_finite_element_off_field_data(
const std::string &fe_name,
617 const std::string &name_filed);
619 modify_finite_element_off_field_row(
const std::string &fe_name,
620 const std::string &name_row);
622 modify_finite_element_off_field_col(
const std::string &fe_name,
623 const std::string &name_col);
625 const EntityHandle meshset,
const EntityType
type,
626 const std::string &name,
const bool recursive =
true);
627 MoFEMErrorCode add_ents_to_finite_element_by_dim(
const EntityHandle meshset,
629 const std::string &name,
630 const bool recursive =
true);
631 MoFEMErrorCode add_ents_to_finite_element_by_type(
const Range &ents,
632 const EntityType
type,
633 const std::string &name);
634 MoFEMErrorCode add_ents_to_finite_element_by_dim(
const Range &ents,
636 const std::string &name);
641 add_ents_to_finite_element_by_MESHSET(
const EntityHandle meshset,
642 const std::string &name,
643 const bool recursive =
false);
645 const Range &vert,
const std::string &name);
647 const Range &vert,
const std::string &name);
649 const EntityHandle meshset,
const std::string &name,
650 const bool recursive =
false);
652 const Range &tris,
const std::string &name);
654 const EntityHandle meshset,
const std::string &name,
655 const bool recursive =
false);
657 const Range &tets,
const std::string &name);
659 const EntityHandle meshset,
const std::string &name,
660 const bool recursive =
false);
664 const Range &prims,
const std::string &name);
666 const EntityHandle meshset,
const std::string &name,
667 const bool recursive =
false);
676 remove_ents_from_finite_element_by_bit_ref(
const BitRefLevel bit,
679 MoFEMErrorCode remove_ents_from_finite_element(
const std::string name,
680 const EntityHandle meshset,
681 const EntityType
type,
683 MoFEMErrorCode remove_ents_from_finite_element(
const std::string name,
698 BitFEId getBitFEId(
const std::string &name)
const;
705 std::string getBitFEIdName(
const BitFEId id)
const;
706 EntityHandle get_finite_element_meshset(
const BitFEId id)
const;
707 EntityHandle get_finite_element_meshset(
const std::string &name)
const;
709 get_finite_element_entities_by_dimension(
const std::string name,
int dim,
711 MoFEMErrorCode get_finite_element_entities_by_type(
const std::string name,
714 MoFEMErrorCode get_finite_element_entities_by_handle(
const std::string name,
727 bool check_problem(
const std::string name);
730 modify_problem_add_finite_element(
const std::string &name_problem,
731 const std::string &MoFEMFiniteElement_name);
733 const std::string &name_problem,
734 const std::string &MoFEMFiniteElement_name);
736 modify_problem_ref_level_add_bit(
const std::string &name_problem,
739 modify_problem_ref_level_set_bit(
const std::string &name_problem,
742 modify_problem_mask_ref_level_add_bit(
const std::string &name_problem,
745 modify_problem_mask_ref_level_set_bit(
const std::string &name_problem,
747 BitProblemId getBitProblemId(
const std::string &name)
const;
756 const Range *
const ents_ptr =
nullptr,
758 MoFEMErrorCode buildFiniteElements(
const boost::shared_ptr<FiniteElement> &fe,
759 const Range *ents_ptr = NULL,
766 MoFEMErrorCode clear_finite_elements(
const std::string name,
const Range ents,
770 get_problem_finite_elements_entities(
const std::string &name,
771 const std::string &fe_name,
772 const EntityHandle meshset);
802 clear_adjacencies_finite_elements(
const BitRefLevel bit,
806 clear_adjacencies_finite_elements(
const Range ents,
809 clear_adjacencies_finite_elements(
const std::string name,
const Range ents,
822 problem_basic_method_preProcess(
const std::string &problem_name,
829 problem_basic_method_postProcess(
const std::string &problem_name,
840 const Problem *problem_ptr,
const std::string &fe_name,
FEMethod &method,
841 int lower_rank,
int upper_rank,
842 boost::shared_ptr<NumeredEntFiniteElement_multiIndex> fe_ptr =
nullptr,
848 const std::string &problem_name,
const std::string &fe_name,
849 FEMethod &method,
int lower_rank,
int upper_rank,
850 boost::shared_ptr<NumeredEntFiniteElement_multiIndex> fe_ptr =
nullptr,
856 const std::string &problem_name,
const std::string &fe_name,
858 boost::shared_ptr<NumeredEntFiniteElement_multiIndex> fe_ptr =
nullptr,
865 DofMethod &method,
int lower_rank,
int upper_rank,
869 DofMethod &method,
int lower_rank,
int upper_rank,
890 Range
const *
const ents =
nullptr,
912 const Problem **problem_ptr)
const;
916 *dofs_elements_adjacency)
const;
925 const Problem *get_problem(
const std::string problem_name)
const;
928 get_ents_elements_adjacency()
const;
930 FieldEntityByUId::iterator
931 get_ent_field_by_name_begin(
const std::string &field_name)
const;
932 FieldEntityByUId::iterator
933 get_ent_field_by_name_end(
const std::string &field_name)
const;
934 DofEntityByUId::iterator
935 get_dofs_by_name_begin(
const std::string &field_name)
const;
936 DofEntityByUId::iterator
937 get_dofs_by_name_end(
const std::string &field_name)
const;
938 DofEntityByUId::iterator
939 get_dofs_by_name_and_ent_begin(
const std::string &field_name,
940 const EntityHandle ent)
const;
941 DofEntityByUId::iterator
942 get_dofs_by_name_and_ent_end(
const std::string &field_name,
943 const EntityHandle ent)
const;
944 DofEntityByUId::iterator
945 get_dofs_by_name_and_type_begin(
const std::string &field_name,
946 const EntityType
type)
const;
947 DofEntityByUId::iterator
948 get_dofs_by_name_and_type_end(
const std::string &field_name,
949 const EntityType ent)
const;
950 EntFiniteElementByName::iterator
951 get_fe_by_name_begin(
const std::string &fe_name)
const;
952 EntFiniteElementByName::iterator
953 get_fe_by_name_end(
const std::string &fe_name)
const;
1000 struct WrapMPIComm {
1002 : comm(comm), duplicatedComm(duplicated_comm) {
1003 ierr = PetscCommDuplicate(comm, &duplicated_comm, NULL);
1004 CHKERRABORT(comm,
ierr);
1007 ierr = PetscCommDestroy(&duplicatedComm);
1008 CHKERRABORT(comm,
ierr);
1026 mutable boost::ptr_map<unsigned long, UnknownInterface>
iFaces;
1123 virtual boost::shared_ptr<RefEntityTmp<0>>
1130 MPI_Comm comm = PETSC_COMM_WORLD,
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.
Core interface class for user interface.
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.
MoFEMTypes
Those types control how functions respond on arguments, f.e. error handling.
FieldApproximationBase
approximation base
FieldSpace
approximation spaces
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< 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
MultiIndex container keeps FieldEntity.
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.
boost::function< MoFEMErrorCode(Interface &moab, const Field &field, const EntFiniteElement &fe, Range &adjacency)> ElementAdjacencyFunct
user adjacency function
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.
static MoFEMErrorCodeGeneric< PetscErrorCode > ierr
PetscErrorCode MoFEMErrorCode
MoFEM/PETSc error code.
std::bitset< BITFEID_SIZE > BitFEId
Finite element Id.
std::bitset< BITPROBLEMID_SIZE > BitProblemId
Problem Id.
int ApproximationOrder
Approximation on the entity.
std::bitset< BITFIELDID_SIZE > BitFieldId
Field Id.
int FieldCoefficientsNumber
Number of field coefficients.
std::bitset< BITREFLEVEL_SIZE > BitRefLevel
Bit structure attached to each entity identifying to what mesh entity is attached.
char FieldBitNumber
Field bit number.
implementation of Data Operators for Forces and Sources
DeprecatedCoreInterface Interface
boost::shared_ptr< CacheTuple > CacheTupleSharedPtr
boost::weak_ptr< CacheTuple > CacheTupleWeakPtr
Data structure to exchange data between mofem and User Loop Methods.
const int getValue() const
Get the core.
MPI_Comm & duplicatedComm
WrapMPIComm(MPI_Comm &comm, MPI_Comm &duplicated_comm)
moab::Interface & get_moab()
PetscLogEvent MOFEM_EVENT_createMat
static bool isGloballyInitialised
Core base globally initialized.
DEPRECATED MoFEMErrorCode add_ents_to_finite_element_by_PRISMs(const Range &prims, const BitFEId id)
PetscBool initaliseAndBuildFiniteElements
int get_comm_rank() const
FiniteElement_multiIndex finiteElements
finite elements
MoFEMErrorCode build_finite_elements(const string fe_name, const Range *const ents_ptr=nullptr, int verb=DEFAULT_VERBOSITY)
Build finite elements.
FieldEntity_multiIndex entsFields
entities on fields
Field_multiIndex fIelds
fields
EntFiniteElement_multiIndex entsFiniteElements
finite element entities
PetscLogEvent MOFEM_EVENT_preProcess
Event for preProcess finite element.
RefEntityTmp< 0 > getRefEntity(const EntityHandle ent)
int get_comm_size() const
MPI_Comm & get_comm() const
DofEntity_multiIndex dofsField
dofs on fields
Tag th_Part
Tag for partition number.
MPI_Comm cOmm
MoFEM communicator.
const MeshsetsManager & get_meshsets_manager() const
get MeshsetsManager pointer
static PetscBool isInitialized
petsc was initialised by other agent
int * fShift
Ptr to tag handle storing last set bit in field ID.
int verbose
Verbosity level.
int & getBuildMoFEM() const
Get flags/semaphores for different stages.
PetscBool initaliseAndBuildField
int sIze
MoFEM communicator size.
RefElement_multiIndex refinedFiniteElements
refined elements
int rAnk
MOFEM communicator rank.
Tag th_ElemType
Needed for VTK files.
RefEntity_multiIndex refinedEntities
refined entities
ParallelComm * pComm
MOAB communicator structure.
PetscLogEvent MOFEM_EVENT_operator
Event for evaluating operator of finite element.
Tag get_th_RefBitLevel() const
boost::shared_ptr< WrapMPIComm > wrapMPIComm
std::string optionsPrefix
Prefix for options on command line.
MeshsetsManager & get_meshsets_manager()
get MeshsetsManager pointer
int * buildMoFEM
keeps flags/semaphores for different stages
Tag get_th_RefParentHandle() const
const int getValue() const
Get the core.
boost::shared_ptr< BasicEntityData > & get_basic_entity_data_ptr()
Get pointer to basic entity data.
static int mpiInitialised
mpi was initialised by other agent
Tag th_ProblemGhostNbDofRow
PetscLogEvent MOFEM_EVENT_postProcess
Event for postProcess finite element.
boost::shared_ptr< BasicEntityData > basicEntityDataPtr
int * feShift
Ptr to tag handle storing last set bit in finite element ID.
std::reference_wrapper< moab::Interface > moab
moab database
Tag get_th_RefType() const
FieldEntityEntFiniteElementAdjacencyMap_multiIndex entFEAdjacencies
adjacencies of elements to dofs
boost::ptr_map< unsigned long, UnknownInterface > iFaces
Hash map of pointers to interfaces.
Problem_multiIndex pRoblems
problems multi-index
Tag th_ProblemGhostNbDofCol
int * pShift
Ptr to tag handle storing last set bit in problem ID.
const moab::Interface & get_moab() const
Tag get_th_RefBitEdge() const
MoFEMErrorCode setFieldOrder(const Range &ents, const BitFieldId id, const ApproximationOrder order, int ver)
MoFEMErrorCode set_moab_interface(moab::Interface &new_moab, int verb)
static constexpr const int value
CoreTmp(moab::Interface &moab, MPI_Comm comm=PETSC_COMM_WORLD, const int verbose=VERBOSE)
const int getValue() const
virtual boost::shared_ptr< RefEntityTmp< 0 > > make_shared_ref_entity(const EntityHandle ent)
Deprecated interface functions.
Data structure to exchange data between mofem and User Loop Methods on entities.
Data structure to exchange data between mofem and User Loop Methods on entities.
structure for User Loop Methods on finite elements
Provide data structure for (tensor) field approximation.
MoFEM interface unique ID.
Interface for managing meshsets containing materials and boundary conditions.
keeps basic data about problem
Struct keeps handle to refined handle.
base class for all interface classes