v0.14.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 () |
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. More... | |
MoFEMErrorCode | buildProblem (const std::string name, const bool square_matrix, int verb=VERBOSE) |
build problem data structures More... | |
MoFEMErrorCode | buildProblem (Problem *problem_ptr, const bool square_matrix, int verb=VERBOSE) |
build problem data structures More... | |
MoFEMErrorCode | buildProblemOnDistributedMesh (const std::string name, const bool square_matrix, int verb=VERBOSE) |
build problem data structures, assuming that mesh is distributed (collective) More... | |
MoFEMErrorCode | buildProblemOnDistributedMesh (Problem *problem_ptr, const bool square_matrix=true, int verb=VERBOSE) |
build problem data structures, assuming that mesh is distributed (collective) More... | |
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 More... | |
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 More... | |
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 More... | |
MoFEMErrorCode | partitionSimpleProblem (const std::string name, int verb=VERBOSE) |
partition problem dofs More... | |
MoFEMErrorCode | partitionProblem (const std::string name, int verb=VERBOSE) |
partition problem dofs (collective) More... | |
MoFEMErrorCode | printPartitionedProblem (const Problem *problem_ptr, int verb=VERBOSE) |
MoFEMErrorCode | debugPartitionedProblem (const Problem *problem_ptr, int verb=VERBOSE) |
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 More... | |
MoFEMErrorCode | partitionGhostDofs (const std::string name, int verb=VERBOSE) |
determine ghost nodes More... | |
MoFEMErrorCode | partitionGhostDofsOnDistributedMesh (const std::string name, int verb=VERBOSE) |
determine ghost nodes on distributed meshes More... | |
MoFEMErrorCode | getFEMeshset (const std::string prb_name, const std::string &fe_name, EntityHandle *meshset) const |
create add entities of finite element in the problem More... | |
MoFEMErrorCode | getProblemElementsLayout (const std::string name, const std::string &fe_name, PetscLayout *layout) const |
Get layout of elements in the problem. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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 broke space. More... | |
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. More... | |
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 |
Mark DOFs. More... | |
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 indices. More... | |
MoFEMErrorCode | addFieldToEmptyFieldBlocks (const std::string problem_name, const std::string row_field, const std::string col_field) const |
add empty block to problem More... | |
Public Member Functions inherited from MoFEM::UnknownInterface | |
template<class IFACE > | |
MoFEMErrorCode | registerInterface (bool error_if_registration_failed=true) |
Register interface. More... | |
template<class IFACE > | |
MoFEMErrorCode | getInterface (IFACE *&iface) const |
Get interface reference to pointer of interface. More... | |
template<class IFACE > | |
MoFEMErrorCode | getInterface (IFACE **const iface) const |
Get interface pointer to pointer of interface. More... | |
template<class IFACE , typename boost::enable_if< boost::is_pointer< IFACE >, int >::type = 0> | |
IFACE | getInterface () const |
Get interface pointer to pointer of interface. More... | |
template<class IFACE , typename boost::enable_if< boost::is_reference< IFACE >, int >::type = 0> | |
IFACE | getInterface () const |
Get reference to interface. More... | |
template<class IFACE > | |
IFACE * | getInterface () const |
Function returning pointer to interface. More... | |
virtual | ~UnknownInterface ()=default |
Public Attributes | |
MoFEM::Core & | cOre |
PetscBool | buildProblemFromFields |
PetscBool | synchroniseProblemEntities |
DOFs in fields, not from DOFs on elements. More... | |
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. More... | |
static MoFEMErrorCode | getFileVersion (moab::Interface &moab, Version &version) |
Get database major version. More... | |
static MoFEMErrorCode | setFileVersion (moab::Interface &moab, Version version=Version(MoFEM_VERSION_MAJOR, MoFEM_VERSION_MINOR, MoFEM_VERSION_BUILD)) |
Get database major version. More... | |
static MoFEMErrorCode | getInterfaceVersion (Version &version) |
Get database major version. More... | |
Problem manager is used to build and partition problems.
Definition at line 21 of file ProblemsManager.hpp.
MoFEM::ProblemsManager::ProblemsManager | ( | const MoFEM::Core & | core | ) |
Definition at line 55 of file ProblemsManager.cpp.
|
virtualdefault |
MoFEMErrorCode MoFEM::ProblemsManager::addFieldToEmptyFieldBlocks | ( | const std::string | problem_name, |
const std::string | row_field, | ||
const std::string | col_field | ||
) | const |
add empty block to problem
MatrixManager assumes that all blocks, i.e. all fields combinations are non zero. This is not always the case, to optimise code and reduce memory usage user can specify which blocks are empty.
problem_name | problem name |
row_field | row filed name |
col_field | col field name |
Definition at line 3681 of file ProblemsManager.cpp.
MoFEMErrorCode MoFEM::ProblemsManager::debugPartitionedProblem | ( | const Problem * | problem_ptr, |
int | verb = VERBOSE |
||
) |
Definition at line 2084 of file ProblemsManager.cpp.
MoFEMErrorCode MoFEM::ProblemsManager::getOptions | ( | ) |
Definition at line 62 of file ProblemsManager.cpp.
MoFEMErrorCode MoFEM::ProblemsManager::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 broke space.
dof_view | |
problem_name | |
rc | row or column |
field_name | |
ents | side entities |
bridge_dim | dimension of bridge entity (dofs are on iterator by have associated side entity) |
lo_coeff | |
hi_coeff | |
lo_order | |
hi_order | |
verb | |
debug |
Definition at line 2605 of file ProblemsManager.cpp.
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 3548 of file ProblemsManager.cpp.
|
inline |
Definition at line 438 of file ProblemsManager.hpp.
MoFEMErrorCode MoFEM::ProblemsManager::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 indices.
Vector with local DOFs marked by entities
problem_name | |
row | |
ents | |
marker |
Definition at line 3643 of file ProblemsManager.cpp.
MoFEMErrorCode MoFEM::ProblemsManager::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 |
Mark DOFs.
problem_name | |
rc | |
field_name | |
lo | |
hi | |
op | |
marker |
Definition at line 3595 of file ProblemsManager.cpp.
MoFEMErrorCode MoFEM::ProblemsManager::printPartitionedProblem | ( | const Problem * | problem_ptr, |
int | verb = VERBOSE |
||
) |
Definition at line 2065 of file ProblemsManager.cpp.
|
virtual |
Implements MoFEM::UnknownInterface.
Definition at line 49 of file ProblemsManager.cpp.
MoFEMErrorCode MoFEM::ProblemsManager::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.
problem_name | |
field_name | |
ents | |
lo_coeff | |
hi_coeff | |
lo_order | |
hi_order | |
verb | |
debug |
Definition at line 2714 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 3520 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 3226 of file ProblemsManager.cpp.
PetscBool MoFEM::ProblemsManager::buildProblemFromFields |
If set to true, problem is build from
Definition at line 30 of file ProblemsManager.hpp.
MoFEM::Core& MoFEM::ProblemsManager::cOre |
Definition at line 26 of file ProblemsManager.hpp.
|
private |
Definition at line 495 of file ProblemsManager.hpp.
PetscBool MoFEM::ProblemsManager::synchroniseProblemEntities |
DOFs in fields, not from DOFs on elements.
Definition at line 33 of file ProblemsManager.hpp.