v0.14.0 |
Adding and managing problems. More...
Files | |
file | ProblemsManager.cpp |
Managing complexities for problem. | |
file | ProblemsManager.hpp |
Interface managing problems. | |
Functions | |
DEPRECATED MoFEMErrorCode | MoFEM::ProblemsManager::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 | MoFEM::ProblemsManager::buildProblem (const std::string name, const bool square_matrix, int verb=VERBOSE) |
build problem data structures More... | |
MoFEMErrorCode | MoFEM::ProblemsManager::buildProblem (Problem *problem_ptr, const bool square_matrix, int verb=VERBOSE) |
build problem data structures More... | |
MoFEMErrorCode | MoFEM::ProblemsManager::buildProblemOnDistributedMesh (const std::string name, const bool square_matrix, int verb=VERBOSE) |
build problem data structures, assuming that mesh is distributed (collective) More... | |
MoFEMErrorCode | MoFEM::ProblemsManager::buildProblemOnDistributedMesh (Problem *problem_ptr, const bool square_matrix=true, int verb=VERBOSE) |
build problem data structures, assuming that mesh is distributed (collective) More... | |
MoFEMErrorCode | MoFEM::ProblemsManager::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 | MoFEM::ProblemsManager::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 | MoFEM::ProblemsManager::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 | MoFEM::ProblemsManager::partitionSimpleProblem (const std::string name, int verb=VERBOSE) |
partition problem dofs More... | |
MoFEMErrorCode | MoFEM::ProblemsManager::partitionProblem (const std::string name, int verb=VERBOSE) |
partition problem dofs (collective) More... | |
MoFEMErrorCode | MoFEM::ProblemsManager::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 | MoFEM::ProblemsManager::partitionGhostDofs (const std::string name, int verb=VERBOSE) |
determine ghost nodes More... | |
MoFEMErrorCode | MoFEM::ProblemsManager::partitionGhostDofsOnDistributedMesh (const std::string name, int verb=VERBOSE) |
determine ghost nodes on distributed meshes More... | |
MoFEMErrorCode | MoFEM::ProblemsManager::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 | MoFEM::ProblemsManager::getProblemElementsLayout (const std::string name, const std::string &fe_name, PetscLayout *layout) const |
Get layout of elements in the problem. More... | |
MoFEMErrorCode | MoFEM::ProblemsManager::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 | MoFEM::ProblemsManager::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... | |
Read load and boradcoast | |
MoFEMErrorCode | MoFEM::CommInterface::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... | |
Adding and managing problems.
MoFEMErrorCode MoFEM::ProblemsManager::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
out_name | name of build problem |
add_row_problems | vector of add row problems |
add_col_problems | vector of add col problems |
square_matrix | true if structurally squared matrix |
verb | verbosity level |
Definition at line 1250 of file ProblemsManager.cpp.
MoFEMErrorCode MoFEM::ProblemsManager::buildProblem | ( | const std::string | name, |
const bool | square_matrix, | ||
int | verb = VERBOSE |
||
) |
build problem data structures
name | problem name |
square_matrix | structurally symmetric problem |
verb | verbosity level |
Definition at line 87 of file ProblemsManager.cpp.
MoFEMErrorCode MoFEM::ProblemsManager::buildProblem | ( | Problem * | problem_ptr, |
const bool | square_matrix, | ||
int | verb = VERBOSE |
||
) |
build problem data structures
problem | pointer |
square_matrix | structurally symmetric problem |
verb | verbosity level |
Definition at line 107 of file ProblemsManager.cpp.
MoFEMErrorCode MoFEM::ProblemsManager::buildProblemOnDistributedMesh | ( | const std::string | name, |
const bool | square_matrix, | ||
int | verb = VERBOSE |
||
) |
build problem data structures, assuming that mesh is distributed (collective)
Mesh is distributed, that means that each processor keeps only own part of the mesh and shared entities.
Collective - need to be run on all processors in communicator, i.e. each function has to call this function.
Definition at line 290 of file ProblemsManager.cpp.
MoFEMErrorCode MoFEM::ProblemsManager::buildProblemOnDistributedMesh | ( | Problem * | problem_ptr, |
const bool | square_matrix = true , |
||
int | verb = VERBOSE |
||
) |
build problem data structures, assuming that mesh is distributed (collective)
Mesh is distributed, that means that each processor keeps only own part of the mesh and shared entities.
Collective - need to be run on all processors in communicator, i.e. each function has to call this function.
Definition at line 313 of file ProblemsManager.cpp.
MoFEMErrorCode MoFEM::ProblemsManager::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
out_name | problem |
fields_row | vector of fields composing problem |
fields_col | vector of fields composing problem |
main_problem | main problem |
Definition at line 981 of file ProblemsManager.cpp.
MoFEMErrorCode MoFEM::ProblemsManager::getFEMeshset | ( | const std::string | prb_name, |
const std::string & | fe_name, | ||
EntityHandle * | meshset | ||
) | const |
create add entities of finite element in the problem
\create add entities of finite element in the problem
prb_name | name of the problem |
fe_name | name of the entity |
meshset | pointer meshset handle |
Definition at line 2559 of file ProblemsManager.cpp.
MoFEMErrorCode MoFEM::ProblemsManager::getProblemElementsLayout | ( | const std::string | name, |
const std::string & | fe_name, | ||
PetscLayout * | layout | ||
) | const |
Get layout of elements in the problem.
In layout is stored information how many elements is on each processor, for more information look int petsc documentation http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/IS/PetscLayoutCreate.html#PetscLayoutCreate
name | problem name |
fe_name | finite elements |
layout | layout |
verb | verbosity level |
Definition at line 2593 of file ProblemsManager.cpp.
MoFEMErrorCode MoFEM::ProblemsManager::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
name | problem name |
problem_for_rows | problem used to index rows |
copy_rows | just copy rows dofs |
problem_for_cols | problem used to index cols |
copy_cols | just copy cols dofs |
If copy_rows/copy_cols is set to false only partition is copied between problems.
Definition at line 1896 of file ProblemsManager.cpp.
MoFEMErrorCode MoFEM::ProblemsManager::partitionFiniteElements | ( | const std::string | name, |
bool | part_from_moab = false , |
||
int | low_proc = -1 , |
||
int | hi_proc = -1 , |
||
int | verb = VERBOSE |
||
) |
partition finite elements
Function which partition finite elements based on dofs partitioning.
In addition it sets information about local row and cols dofs at given element on partition.
name | |
part_from_moab | |
low_proc | |
hi_proc | |
verb |
name | problem name |
Definition at line 2167 of file ProblemsManager.cpp.
MoFEMErrorCode MoFEM::ProblemsManager::partitionGhostDofs | ( | const std::string | name, |
int | verb = VERBOSE |
||
) |
determine ghost nodes
name | problem name |
DOFs are ghost dofs if are used by elements on given partition, but not owned by that partition.
Definition at line 2339 of file ProblemsManager.cpp.
MoFEMErrorCode MoFEM::ProblemsManager::partitionGhostDofsOnDistributedMesh | ( | const std::string | name, |
int | verb = VERBOSE |
||
) |
determine ghost nodes on distributed meshes
name | problem name |
It is very similar for partitionGhostDofs, however this explits that mesh is distributed.
DOFs are ghosted if are shered but not owned by partition.
Definition at line 2473 of file ProblemsManager.cpp.
MoFEMErrorCode MoFEM::ProblemsManager::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.
This will use one of the mesh partitioning programs available from PETSc See http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Mat/MatPartitioningType.html
ents | Entities to partition |
dim | Dimension of entities to partition |
adj_dim | Adjacency dimension |
n_parts | Number of partitions |
verb | Verbosity level |
Definition at line 77 of file ProblemsManager.cpp.
MoFEMErrorCode MoFEM::CommInterface::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.
This will use one of the mesh partitioning programs available from PETSc See http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Mat/MatPartitioningType.html
ents | Entities to partition |
dim | Dimension of entities to partition |
adj_dim | Adjacency dimension |
n_parts | Number of partitions |
verb | Verbosity level |
Definition at line 868 of file CommInterface.cpp.
MoFEMErrorCode MoFEM::ProblemsManager::partitionProblem | ( | const std::string | name, |
int | verb = VERBOSE |
||
) |
partition problem dofs (collective)
name | problem name |
Definition at line 1683 of file ProblemsManager.cpp.
MoFEMErrorCode MoFEM::ProblemsManager::partitionSimpleProblem | ( | const std::string | name, |
int | verb = VERBOSE |
||
) |
partition problem dofs
name | problem name |
Definition at line 1537 of file ProblemsManager.cpp.
MoFEMErrorCode MoFEM::ProblemsManager::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.
See for more detail other implementation for removeDofsOnEntities.
problem_name | name of the problem |
field_name | name of the field |
bit_ref_level | bit ref level on which DOFs are removed |
bit_ref_mask | bit ref mask on which DOFs are removed |
ents_ptr | filter entities with given bit and mask |
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 3494 of file ProblemsManager.cpp.
MoFEMErrorCode MoFEM::ProblemsManager::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.
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 2954 of file ProblemsManager.cpp.