![]() |
v0.15.0 |
Problem manager is used to build and partition problems. More...
#include "src/interfaces/ProblemsManager.hpp"
Public Types | |
| enum | MarkOP { OR , AND } |
Public Member Functions | |
| MoFEMErrorCode | query_interface (boost::typeindex::type_index type_index, UnknownInterface **iface) const |
| ProblemsManager (const MoFEM::Core &core) | |
| virtual | ~ProblemsManager ()=default |
| MoFEMErrorCode | getOptions () |
| Get command line options for ProblemsManager. | |
| DEPRECATED MoFEMErrorCode | partitionMesh (const Range &ents, const int dim, const int adj_dim, const int n_parts, Tag *th_vertex_weights=nullptr, Tag *th_edge_weights=nullptr, Tag *th_part_weights=nullptr, int verb=VERBOSE, const bool debug=false) |
| Set partition tag to each finite element in the problem. | |
| MoFEMErrorCode | buildProblem (const std::string name, const bool square_matrix, int verb=VERBOSE) |
| build problem data structures | |
| MoFEMErrorCode | buildProblem (Problem *problem_ptr, const bool square_matrix, int verb=VERBOSE) |
| build problem data structures | |
| MoFEMErrorCode | buildProblemOnDistributedMesh (const std::string name, const bool square_matrix, int verb=VERBOSE) |
| build problem data structures, assuming that mesh is distributed (collective) | |
| MoFEMErrorCode | buildProblemOnDistributedMesh (Problem *problem_ptr, const bool square_matrix=true, int verb=VERBOSE) |
| build problem data structures, assuming that mesh is distributed (collective) | |
| MoFEMErrorCode | buildSubProblem (const std::string out_name, const std::vector< std::string > &fields_row, const std::vector< std::string > &fields_col, const std::string main_problem, const bool square_matrix=true, const map< std::string, boost::shared_ptr< Range > > *entityMapRow=nullptr, const map< std::string, boost::shared_ptr< Range > > *entityMapCol=nullptr, int verb=VERBOSE) |
| build sub problem | |
| MoFEMErrorCode | buildComposedProblem (const std::string out_name, const std::vector< std::string > add_row_problems, const std::vector< std::string > add_col_problems, const bool square_matrix=true, int verb=1) |
| build composite problem | |
| MoFEMErrorCode | inheritPartition (const std::string name, const std::string problem_for_rows, bool copy_rows, const std::string problem_for_cols, bool copy_cols, int verb=VERBOSE) |
| build indexing and partition problem inheriting indexing and partitioning from two other problems | |
| MoFEMErrorCode | partitionSimpleProblem (const std::string name, int verb=VERBOSE) |
| partition problem dofs | |
| MoFEMErrorCode | partitionProblem (const std::string name, int verb=VERBOSE) |
| partition problem dofs (collective) | |
| MoFEMErrorCode | printPartitionedProblem (const Problem *problem_ptr, int verb=VERBOSE) |
| Print partition information for debugging. | |
| MoFEMErrorCode | debugPartitionedProblem (const Problem *problem_ptr, int verb=VERBOSE) |
| Debug partition information. | |
| MoFEMErrorCode | partitionFiniteElements (const std::string name, bool part_from_moab=false, int low_proc=-1, int hi_proc=-1, int verb=VERBOSE) |
| partition finite elements | |
| MoFEMErrorCode | partitionGhostDofs (const std::string name, int verb=VERBOSE) |
| determine ghost nodes | |
| MoFEMErrorCode | partitionGhostDofsOnDistributedMesh (const std::string name, int verb=VERBOSE) |
| determine ghost nodes on distributed meshes | |
| MoFEMErrorCode | getFEMeshset (const std::string prb_name, const std::string &fe_name, EntityHandle *meshset) const |
| Create finite element meshset for the problem. | |
| MoFEMErrorCode | getProblemElementsLayout (const std::string name, const std::string &fe_name, PetscLayout *layout) const |
| Get layout of elements in the problem. | |
| MoFEMErrorCode | removeDofsOnEntities (const std::string problem_name, const std::string field_name, const Range ents, const int lo_coeff=0, const int hi_coeff=MAX_DOFS_ON_ENTITY, const int lo_order=0, const int hi_order=100, int verb=VERBOSE, const bool debug=false) |
| Remove DOFs from problem. | |
| MoFEMErrorCode | removeDofsOnEntitiesNotDistributed (const std::string problem_name, const std::string field_name, const Range ents, const int lo_coeff=0, const int hi_coeff=MAX_DOFS_ON_ENTITY, const int lo_order=0, const int hi_order=100, int verb=VERBOSE, const bool debug=false) |
| Remove DOFs from problem. | |
| MoFEMErrorCode | removeDofsOnEntities (const std::string problem_name, const std::string field_name, const BitRefLevel bit_ref_level, const BitRefLevel bit_ref_mask, Range *ents_ptr=nullptr, const int lo_coeff=0, const int hi_coeff=MAX_DOFS_ON_ENTITY, const int lo_order=0, const int hi_order=100, int verb=VERBOSE, const bool debug=false) |
| Remove DOFs from problem by bit ref level. | |
| MoFEMErrorCode | removeDofsOnEntitiesNotDistributed (const std::string problem_name, const std::string field_name, const BitRefLevel bit_ref_level, const BitRefLevel bit_ref_mask, Range *ents_ptr=nullptr, const int lo_coeff=0, const int hi_coeff=MAX_DOFS_ON_ENTITY, const int lo_order=0, const int hi_order=100, int verb=VERBOSE, const bool debug=false) |
| Remove DOFs from problem. | |
| MoFEMErrorCode | removeDofs (const std::string problem_name, RowColData rc, std::vector< boost::weak_ptr< NumeredDofEntity > > &vec_dof_view, int verb=VERBOSE, const bool debug=false) |
| Remove DOFs from problem on broken space. | |
| MoFEMErrorCode | getSideDofsOnBrokenSpaceEntities (std::vector< boost::weak_ptr< NumeredDofEntity > > &vec_dof_view, const std::string problem_name, RowColData rc, const std::string field_name, const Range ents, int bridge_dim, const int lo_coeff=0, const int hi_coeff=MAX_DOFS_ON_ENTITY, const int lo_order=0, const int hi_order=100, int verb=VERBOSE, const bool debug=false) const |
| Get DOFs on side entities for broken space. | |
| MoFEMErrorCode | markDofs (const std::string problem_name, RowColData rc, const enum MarkOP op, const Range ents, std::vector< unsigned char > &marker) const |
| Create vector with marked indices. | |
| DEPRECATED MoFEMErrorCode | markDofs (const std::string problem_name, RowColData rc, const Range ents, std::vector< unsigned char > &marker) const |
| MoFEMErrorCode | modifyMarkDofs (const std::string problem_name, RowColData rc, const std::string field_name, const int lo, const int hi, const enum MarkOP op, const unsigned char c, std::vector< unsigned char > &marker) const |
| Modify DOF markers for specific field and coefficient range. | |
| MoFEMErrorCode | markDofs (const std::string problem_name, RowColData rc, std::vector< boost::weak_ptr< NumeredDofEntity > > &vec_dof_view, const enum MarkOP op, std::vector< unsigned char > &marker) const |
| Create vector with marked DOF indices based on DOF view. | |
| MoFEMErrorCode | addFieldToEmptyFieldBlocks (const std::string problem_name, const std::string row_field, const std::string col_field) const |
| Add empty field blocks to optimize matrix storage. | |
Public Member Functions inherited from MoFEM::UnknownInterface | |
| template<class IFACE > | |
| MoFEMErrorCode | registerInterface (bool error_if_registration_failed=true) |
| Register interface. | |
| template<class IFACE > | |
| MoFEMErrorCode | getInterface (IFACE *&iface) const |
| Get interface reference to pointer of interface. | |
| template<class IFACE > | |
| MoFEMErrorCode | getInterface (IFACE **const iface) const |
| Get interface pointer to pointer of interface. | |
| template<class IFACE , typename boost::enable_if< boost::is_pointer< IFACE >, int >::type = 0> | |
| IFACE | getInterface () const |
| Get interface pointer to pointer of interface. | |
| template<class IFACE , typename boost::enable_if< boost::is_reference< IFACE >, int >::type = 0> | |
| IFACE | getInterface () const |
| Get reference to interface. | |
| template<class IFACE > | |
| IFACE * | getInterface () const |
| Function returning pointer to interface. | |
| virtual | ~UnknownInterface ()=default |
Public Attributes | |
| MoFEM::Core & | cOre |
| PetscBool | buildProblemFromFields |
| PetscBool | synchroniseProblemEntities |
| DOFs in fields, not from DOFs on elements. | |
Private Attributes | |
| PetscLogEvent | MOFEM_EVENT_ProblemsManager |
Additional Inherited Members | |
Static Public Member Functions inherited from MoFEM::UnknownInterface | |
| static MoFEMErrorCode | getLibVersion (Version &version) |
| Get library version. | |
| static MoFEMErrorCode | getFileVersion (moab::Interface &moab, Version &version) |
| Get database major version. | |
| static MoFEMErrorCode | setFileVersion (moab::Interface &moab, Version version=Version(MoFEM_VERSION_MAJOR, MoFEM_VERSION_MINOR, MoFEM_VERSION_BUILD)) |
| Get database major version. | |
| static MoFEMErrorCode | getInterfaceVersion (Version &version) |
| Get database major version. | |
Problem manager is used to build and partition problems.
The ProblemsManager serves as the central interface for creating, configuring, and managing finite element problems within the MoFEM framework. It acts as a bridge between the Core interface (which manages the fundamental MoFEM data structures like fields, finite elements, and DOFs) and the PETSc Discrete Manager (DM) system for parallel computing.
The ProblemsManager operates on top of the MoFEM::Core interface:
The ProblemsManager creates and configures PETSc DM objects:
Broken DOFs support discontinuous finite element spaces:
getSideDofsOnBrokenSpaceEntities() manages interface DOFsDOF removal serves multiple purposes:
The removal process:
buildProblem*() to create Problem objectpartition*() functions for parallel distributionDefinition at line 133 of file ProblemsManager.hpp.
| MoFEM::ProblemsManager::ProblemsManager | ( | const MoFEM::Core & | core | ) |
Definition at line 55 of file ProblemsManager.cpp.
|
virtualdefault |
| MoFEMErrorCode MoFEM::ProblemsManager::markDofs | ( | const std::string | problem_name, |
| RowColData | rc, | ||
| const enum MarkOP | op, | ||
| const Range | ents, | ||
| std::vector< unsigned char > & | marker | ||
| ) | const |
Create vector with marked indices.
Vector with local DOFs marked by entities
| problem_name | |
| row | |
| ents | |
| marker |
Definition at line 3553 of file ProblemsManager.cpp.
|
inline |
Definition at line 620 of file ProblemsManager.hpp.
|
virtual |
Implements MoFEM::UnknownInterface.
Definition at line 49 of file ProblemsManager.cpp.
| MoFEMErrorCode MoFEM::ProblemsManager::removeDofsOnEntitiesNotDistributed | ( | const std::string | problem_name, |
| const std::string | field_name, | ||
| const BitRefLevel | bit_ref_level, | ||
| const BitRefLevel | bit_ref_mask, | ||
| Range * | ents_ptr = nullptr, |
||
| const int | lo_coeff = 0, |
||
| const int | hi_coeff = MAX_DOFS_ON_ENTITY, |
||
| const int | lo_order = 0, |
||
| const int | hi_order = 100, |
||
| int | verb = VERBOSE, |
||
| const bool | debug = false |
||
| ) |
Remove DOFs from problem.
Remove DOFs from problem which are on entities on the given range and given field name. On the finite element level, DOFs can be still accessed however local PETSc indices and global PETSc indices are marked with the index -1.
| problem_name | name of the problem |
| field_name | name of the field |
| ents | entities on which DOFs are removed |
| lo_coeff | low dof coefficient (rank) |
| hi_coeff | high dof coefficient (rank) |
| verb | verbosity level |
| debug | to debug and seek for inconsistencies set to true |
Definition at line 3525 of file ProblemsManager.cpp.
| MoFEMErrorCode MoFEM::ProblemsManager::removeDofsOnEntitiesNotDistributed | ( | const std::string | problem_name, |
| const std::string | field_name, | ||
| const Range | ents, | ||
| const int | lo_coeff = 0, |
||
| const int | hi_coeff = MAX_DOFS_ON_ENTITY, |
||
| const int | lo_order = 0, |
||
| const int | hi_order = 100, |
||
| int | verb = VERBOSE, |
||
| const bool | debug = false |
||
| ) |
Remove DOFs from problem.
Remove DOFs from problem which are on entities on the given range and given field name. On the finite element level, DOFs can be still accessed however local PETSc indices and global PETSc indices are marked with the index -1.
| problem_name | name of the problem |
| field_name | name of the field |
| ents | entities on which DOFs are removed |
| lo_coeff | low dof coefficient (rank) |
| hi_coeff | high dof coefficient (rank) |
| verb | verbosity level |
| debug | to debug and seek for inconsistencies set to true |
Definition at line 3231 of file ProblemsManager.cpp.
| PetscBool MoFEM::ProblemsManager::buildProblemFromFields |
If set to true, problem is build from
Definition at line 142 of file ProblemsManager.hpp.
| MoFEM::Core& MoFEM::ProblemsManager::cOre |
Definition at line 138 of file ProblemsManager.hpp.
|
private |
Definition at line 688 of file ProblemsManager.hpp.
| PetscBool MoFEM::ProblemsManager::synchroniseProblemEntities |
DOFs in fields, not from DOFs on elements.
Definition at line 145 of file ProblemsManager.hpp.