19#ifndef __PROBLEMSMANAGER_HPP__
20#define __PROBLEMSMANAGER_HPP__
64 const int adj_dim,
const int n_parts,
65 Tag *th_vertex_weights =
nullptr,
66 Tag *th_edge_weights =
nullptr,
67 Tag *th_part_weights =
nullptr,
69 const bool debug =
false);
119 const bool square_matrix,
134 const bool square_matrix =
true,
148 const std::string out_name,
const std::vector<std::string> &fields_row,
149 const std::vector<std::string> &fields_col,
150 const std::string main_problem,
const bool square_matrix =
true,
151 const map<std::string, std::pair<EntityType, EntityType>> *entityMapRow =
153 const map<std::string, std::pair<EntityType, EntityType>> *entityMapCol =
170 const std::vector<std::string> add_row_problems,
171 const std::vector<std::string> add_col_problems,
172 const bool square_matrix =
true,
int verb = 1);
190 const std::string problem_for_rows,
192 const std::string problem_for_cols,
193 bool copy_cols,
int verb =
VERBOSE);
233 bool part_from_moab =
false,
234 int low_proc = -1,
int hi_proc = -1,
280 const std::string fe_name,
281 EntityHandle *meshset)
const;
298 const std::string fe_name,
299 PetscLayout *layout)
const;
325 const std::string problem_name,
const std::string
field_name,
326 const Range ents,
const int lo_coeff = 0,
328 const int hi_order = 100,
int verb =
VERBOSE,
const bool debug =
false);
336 const std::string problem_name,
const std::string
field_name,
337 const Range ents,
const int lo_coeff = 0,
339 const int hi_order = 100,
int verb =
VERBOSE,
const bool debug =
false);
359 const std::string problem_name,
const std::string
field_name,
361 Range *ents_ptr =
nullptr,
const int lo_coeff = 0,
363 const int hi_order = 100,
int verb =
VERBOSE,
const bool debug =
false);
371 const std::string problem_name,
const std::string
field_name,
373 Range *ents_ptr =
nullptr,
const int lo_coeff = 0,
375 const int hi_order = 100,
int verb =
VERBOSE,
const bool debug =
false);
392 const enum MarkOP op,
const Range ents,
393 std::vector<unsigned char> &
marker)
const;
400 std::vector<unsigned char> &
marker)
const {
418 const int hi,
const enum MarkOP op,
419 const unsigned char c,
420 std::vector<unsigned char> &
marker)
const;
435 const std::string row_field,
436 const std::string col_field)
const;
#define MAX_DOFS_ON_ENTITY
Maximal number of DOFs on entity.
MoFEMErrorCode buildProblemOnDistributedMesh(const std::string name, const bool square_matrix, int verb=VERBOSE)
build problem data structures, assuming that mesh is distributed (collective)
MoFEMErrorCode getProblemElementsLayout(const std::string name, const std::string fe_name, PetscLayout *layout) const
Get layout of elements in the problem.
MoFEMErrorCode partitionGhostDofs(const std::string name, int verb=VERBOSE)
determine ghost nodes
MoFEMErrorCode partitionSimpleProblem(const std::string name, int verb=VERBOSE)
partition problem dofs
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 getFEMeshset(const std::string prb_name, const std::string fe_name, EntityHandle *meshset) const
create add entities of finite element in the problem
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, std::pair< EntityType, EntityType > > *entityMapRow=nullptr, const map< std::string, std::pair< EntityType, EntityType > > *entityMapCol=nullptr, int verb=VERBOSE)
build sub problem
MoFEMErrorCode buildProblem(const std::string name, const bool square_matrix, int verb=VERBOSE)
build problem data structures
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 partitionProblem(const std::string name, int verb=VERBOSE)
partition problem dofs (collective)
MoFEMErrorCode partitionGhostDofsOnDistributedMesh(const std::string name, int verb=VERBOSE)
determine ghost nodes on distributed meshes
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 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 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.
auto marker
set bit to marker
PetscErrorCode MoFEMErrorCode
MoFEM/PETSc error code.
std::bitset< BITREFLEVEL_SIZE > BitRefLevel
Bit structure attached to each entity identifying to what mesh entity is attached.
implementation of Data Operators for Forces and Sources
constexpr auto field_name
keeps basic data about problem
Problem manager is used to build and partition problems.
DEPRECATED MoFEMErrorCode markDofs(const std::string problem_name, RowColData rc, const Range ents, std::vector< unsigned char > &marker) const
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.
ProblemsManager(const MoFEM::Core &core)
MoFEMErrorCode printPartitionedProblem(const Problem *problem_ptr, int verb=VERBOSE)
MoFEMErrorCode addFieldToEmptyFieldBlocks(const std::string problem_name, const std::string row_field, const std::string col_field) const
add empty block to problem
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.
PetscLogEvent MOFEM_EVENT_ProblemsManager
virtual ~ProblemsManager()=default
PetscBool buildProblemFromFields
PetscBool synchroniseProblemEntities
DOFs in fields, not from DOFs on elements.
MoFEMErrorCode debugPartitionedProblem(const Problem *problem_ptr, int verb=VERBOSE)
MoFEMErrorCode query_interface(boost::typeindex::type_index type_index, UnknownInterface **iface) const
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 getOptions()
base class for all interface classes