39 static constexpr const int value =
N;
43 const EntityHandle ent);
51 MPI_Comm
comm = PETSC_COMM_WORLD,
91 virtual boost::shared_ptr<RefEntityTmp<0>>
98 MPI_Comm
comm = PETSC_COMM_WORLD,
149 static MoFEMErrorCode Initialize(
int *argc,
char ***args,
const char file[],
154 static const std::string &getPetscOptionsFile();
176 boost::shared_ptr<BasicEntityData> &ptr);
178 static boost::shared_ptr<RefEntityTmp<0>>
193 MoFEMErrorCode query_interface(boost::typeindex::type_index type_index,
217 BUILD_FIELD = 1 << 0,
220 BUILD_PROBLEM = 1 << 3,
221 PARTITION_PROBLEM = 1 << 4,
222 PARTITION_FE = 1 << 5,
223 PARTITION_GHOST_DOFS = 1 << 6,
224 PARTITION_MESH = 1 << 7
296 return basicEntityDataPtr;
326 std::reference_wrapper<moab::Interface>
moab;
327 inline moab::Interface &
get_moab() {
return moab; }
328 inline const moab::Interface &
get_moab()
const {
return moab; }
343 check_number_of_ents_in_ents_field(
const std::string &
name)
const;
346 check_number_of_ents_in_ents_finite_element(
const std::string &
name)
const;
347 MoFEMErrorCode check_number_of_ents_in_ents_finite_element()
const;
367 return *get_meshsets_manager_ptr();
370 return *get_meshsets_manager_ptr();
396 const bool remove_parent =
false,
438 std::pair<EntityType,
444 const TagType tag_type = MB_TAG_SPARSE,
477 const TagType tag_type = MB_TAG_SPARSE,
508 const TagType tag_type,
const enum MoFEMTypes bh,
512 const std::string &
name,
515 const std::string &
name,
518 const EntityType
type,
519 const std::string &
name,
521 MoFEMErrorCode add_ents_to_field_by_dim(
const EntityHandle meshset,
523 const std::string &
name,
524 const bool recursive =
true,
526 MoFEMErrorCode add_ents_to_field_by_type(
const EntityHandle meshset,
527 const EntityType
type,
528 const std::string &
name,
529 const bool recursive =
true,
533 const double coords[],
542 MoFEMErrorCode setFieldOrderImpl(boost::shared_ptr<Field> field_ptr,
558 const EntityType
type,
const std::string &
name,
573 buildFieldForNoFieldImpl(boost::shared_ptr<Field> field_ptr,
574 std::map<EntityType, int> &dof_counter,
int verb);
577 std::map<EntityType, int> &dof_counter,
583 buildFieldForL2H1HcurlHdiv(
const BitFieldId id,
584 std::map<EntityType, int> &dof_counter,
585 std::map<EntityType, int> &inactive_dof_counter,
627 const EntityHandle meshset,
628 const EntityType
type,
642 std::string get_field_name(
const BitFieldId id)
const;
643 EntityHandle get_field_meshset(
const BitFieldId id)
const;
644 EntityHandle get_field_meshset(
const std::string
name)
const;
646 int dim,
Range &ents)
const;
651 bool check_field(
const std::string &
name)
const;
653 const Field *get_field_structure(
const std::string &
name,
663 get_finite_element_structure(
const std::string &
name,
666 bool check_finite_element(
const std::string &
name)
const;
672 modify_finite_element_adjacency_table(
const std::string &fe_name,
673 const EntityType
type,
676 modify_finite_element_add_field_data(
const std::string &fe_name,
677 const std::string name_filed);
679 modify_finite_element_add_field_row(
const std::string &fe_name,
680 const std::string name_row);
682 modify_finite_element_add_field_col(
const std::string &fe_name,
683 const std::string name_col);
685 modify_finite_element_off_field_data(
const std::string &fe_name,
686 const std::string name_filed);
688 modify_finite_element_off_field_row(
const std::string &fe_name,
689 const std::string name_row);
691 modify_finite_element_off_field_col(
const std::string &fe_name,
692 const std::string name_col);
694 const EntityHandle meshset,
const EntityType
type,
695 const std::string
name,
const bool recursive =
true);
696 MoFEMErrorCode add_ents_to_finite_element_by_dim(
const EntityHandle meshset,
698 const std::string
name,
699 const bool recursive =
true);
701 const EntityType
type,
702 const std::string
name);
705 const std::string
name);
710 add_ents_to_finite_element_by_MESHSET(
const EntityHandle meshset,
711 const std::string &
name,
712 const bool recursive =
false);
725 const EntityHandle meshset,
726 const EntityType
type,
743 BitFEId getBitFEId(
const std::string &fe_name)
const;
750 std::string getBitFEIdName(
const BitFEId id)
const;
752 EntityHandle get_finite_element_meshset(
const BitFEId id)
const;
753 EntityHandle get_finite_element_meshset(
const std::string
name)
const;
755 get_finite_element_entities_by_dimension(
const std::string
name,
int dim,
776 modify_problem_add_finite_element(
const std::string name_problem,
777 const std::string &fe_name);
779 modify_problem_unset_finite_element(
const std::string name_problem,
780 const std::string &fe_name);
782 modify_problem_ref_level_add_bit(
const std::string &name_problem,
785 modify_problem_ref_level_set_bit(
const std::string &name_problem,
788 modify_problem_mask_ref_level_add_bit(
const std::string &name_problem,
791 modify_problem_mask_ref_level_set_bit(
const std::string &name_problem,
802 const Range *
const ents_ptr =
nullptr,
804 MoFEMErrorCode buildFiniteElements(
const boost::shared_ptr<FiniteElement> &fe,
805 const Range *ents_ptr = NULL,
817 get_problem_finite_elements_entities(
const std::string
name,
818 const std::string &fe_name,
819 const EntityHandle meshset);
853 clear_adjacencies_finite_elements(
const Range ents,
856 clear_adjacencies_finite_elements(
const std::string
name,
const Range ents,
869 problem_basic_method_preProcess(
const std::string &problem_name,
876 problem_basic_method_postProcess(
const std::string &problem_name,
887 const Problem *problem_ptr,
const std::string &fe_name,
FEMethod &method,
888 int lower_rank,
int upper_rank,
889 boost::shared_ptr<NumeredEntFiniteElement_multiIndex> fe_ptr =
nullptr,
895 const std::string problem_name,
const std::string &fe_name,
896 FEMethod &method,
int lower_rank,
int upper_rank,
897 boost::shared_ptr<NumeredEntFiniteElement_multiIndex> fe_ptr =
nullptr,
903 const std::string problem_name,
const std::string &fe_name,
905 boost::shared_ptr<NumeredEntFiniteElement_multiIndex> fe_ptr =
nullptr,
912 DofMethod &method,
int lower_rank,
int upper_rank,
916 DofMethod &method,
int lower_rank,
int upper_rank,
937 Range const *
const ents =
nullptr,
959 const Problem **problem_ptr)
const;
963 *dofs_elements_adjacency)
const;
972 const Problem *get_problem(
const std::string problem_name)
const;
975 get_ents_elements_adjacency()
const;
977 FieldEntityByUId::iterator
978 get_ent_field_by_name_begin(
const std::string &
field_name)
const;
979 FieldEntityByUId::iterator
980 get_ent_field_by_name_end(
const std::string &
field_name)
const;
981 DofEntityByUId::iterator
982 get_dofs_by_name_begin(
const std::string &
field_name)
const;
983 DofEntityByUId::iterator
984 get_dofs_by_name_end(
const std::string &
field_name)
const;
985 DofEntityByUId::iterator
986 get_dofs_by_name_and_ent_begin(
const std::string &
field_name,
987 const EntityHandle ent)
const;
988 DofEntityByUId::iterator
989 get_dofs_by_name_and_ent_end(
const std::string &
field_name,
990 const EntityHandle ent)
const;
991 DofEntityByUId::iterator
992 get_dofs_by_name_and_type_begin(
const std::string &
field_name,
993 const EntityType
type)
const;
994 DofEntityByUId::iterator
995 get_dofs_by_name_and_type_end(
const std::string &
field_name,
996 const EntityType ent)
const;
998 EntFiniteElement_multiIndex::index<Unique_mi_tag>::type::iterator
999 get_fe_by_name_begin(
const std::string &fe_name)
const;
1000 EntFiniteElement_multiIndex::index<Unique_mi_tag>::type::iterator
1001 get_fe_by_name_end(
const std::string &fe_name)
const;
1033 inline MPI_Comm &
get_comm()
const {
return mofemComm; }
1048 boost::shared_ptr<WrapMPIComm>
1056 mutable boost::ptr_map<boost::typeindex::type_index, UnknownInterface>
iFaces;
1068 inline static bool isGloballyInitialised =
false;
1069 inline static int mpiInitialised = 0;
1070 inline static PetscBool isInitialized = PETSC_FALSE;
1071 inline static std::string petscOptionsFile =
"";
1145 virtual boost::shared_ptr<RefEntityTmp<0>>
1151 CoreTmp(moab::Interface &moab,
1152 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
Multi-index container for field storage and retrieval.
MoFEMTypes
Those types control how functions respond on arguments, f.e. error handling.
FieldApproximationBase
approximation base
FieldSpace
approximation spaces
FieldContinuity
Field continuity.
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< 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 > > > > 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, std::vector< EntityHandle > &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.
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
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
boost::shared_ptr< CacheTuple > CacheTupleSharedPtr
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
boost::weak_ptr< CacheTuple > CacheTupleWeakPtr
constexpr auto field_name
multi_index_container< DofsSideMapData, indexed_by< ordered_non_unique< tag< TypeSide_mi_tag >, composite_key< DofsSideMapData, member< DofsSideMapData, EntityType, &DofsSideMapData::type >, member< DofsSideMapData, int, &DofsSideMapData::side > > >, ordered_unique< tag< EntDofIdx_mi_tag >, member< DofsSideMapData, int, &DofsSideMapData::dof > > > > DofsSideMap
Map entity stype and side to element/entity dof index.
Data structure to exchange data between MoFEM and User Loop Methods.
int getValue() const
Get the core.
boost::shared_ptr< BasicEntityData > & get_basic_entity_data_ptr()
Get pointer to basic entity data.
const MeshsetsManager & get_meshsets_manager() const
get MeshsetsManager reference
virtual MoFEMErrorCode add_broken_field(const std::string name, const FieldSpace space, const FieldApproximationBase base, const FieldCoefficientsNumber nb_coefficients, std::vector< std::pair< EntityType, std::function< MoFEMErrorCode(BaseFunction::DofsSideMap &)> > > list_dof_side_map, const TagType tag_type=MB_TAG_SPARSE, const enum MoFEMTypes bh=MF_EXCL, int verb=DEFAULT_VERBOSITY)
Add field.
MPI_Comm & get_comm() const
PetscLogEvent MOFEM_EVENT_createMat
PetscBool initaliseAndBuildFiniteElements
int get_comm_rank() const
FiniteElement_multiIndex finiteElements
finite elements
const moab::Interface & get_moab() const
FieldEntity_multiIndex entsFields
entities on fields
Field_multiIndex fIelds
fields
EntFiniteElement_multiIndex entsFiniteElements
finite element entities
int & getBuildMoFEM() const
Get flags/semaphores for different stages.
PetscLogEvent MOFEM_EVENT_preProcess
Event for preProcess finite element.
int get_comm_size() const
DofEntity_multiIndex dofsField
dofs on fields
Tag th_Part
Tag for partition number.
int getValue() const
Get the core.
int verbose
Verbosity level.
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
MeshsetsManager & get_meshsets_manager()
get MeshsetsManager reference
ParallelComm * pComm
MOAB communicator structure.
PetscLogEvent MOFEM_EVENT_operator
Event for evaluating operator of finite element.
Tag get_th_RefBitLevel() const
BitProblemId getProblemShift()
Return unique problem Id.
moab::Interface & get_moab()
MPI_Comm mofemComm
MoFEM communicator.
std::string optionsPrefix
Prefix for options on command line.
int * buildMoFEM
keeps flags/semaphores for different stages
Tag get_th_RefParentHandle() const
bool check_problem(const std::string name)
check if problem exist
Tag th_ProblemGhostNbDofRow
PetscLogEvent MOFEM_EVENT_postProcess
Event for postProcess finite element.
boost::shared_ptr< BasicEntityData > basicEntityDataPtr
std::reference_wrapper< moab::Interface > moab
moab database
FieldEntityEntFiniteElementAdjacencyMap_multiIndex entFEAdjacencies
adjacencies of elements to dofs
Problem_multiIndex pRoblems
problems multi-index
Tag th_ProblemGhostNbDofCol
Tag get_th_RefBitEdge() const
MoFEMErrorCode setFieldOrder(const Range &ents, const BitFieldId id, const ApproximationOrder order, int ver)
boost::ptr_map< boost::typeindex::type_index, UnknownInterface > iFaces
Hash map of pointers to interfaces.
boost::shared_ptr< WrapMPIComm > wrapMPIMOABComm
manage creation and destruction of MOAB communicator
RefEntityTmp< 0 > getRefEntity(const EntityHandle ent)
MoFEMErrorCode set_moab_interface(moab::Interface &new_moab, int verb)
static constexpr const int value
virtual boost::shared_ptr< RefEntityTmp< 0 > > make_shared_ref_entity(const EntityHandle ent)
Deprecated interface functions.
Data structure for user loop methods on degrees of freedom (DOFs)
Data structure for user loop methods on entities.
Structure for user loop methods on finite elements.
Field data structure for finite element approximation.
Finite element definition.
Interface for managing meshsets containing materials and boundary conditions.
keeps basic data about problem
base class for all interface classes
Wrap MPI communicator such that is destroyed when is out of scope.