20#ifndef __PROBLEMSMANAGER_HPP__
21#define __PROBLEMSMANAGER_HPP__
176 const int adj_dim,
const int n_parts,
177 Tag *th_vertex_weights =
nullptr,
178 Tag *th_edge_weights =
nullptr,
179 Tag *th_part_weights =
nullptr,
181 const bool debug =
false);
234 const bool square_matrix,
252 const bool square_matrix =
true,
274 const std::string out_name,
const std::vector<std::string> &fields_row,
275 const std::vector<std::string> &fields_col,
276 const std::string main_problem,
const bool square_matrix =
true,
277 const map<std::string, boost::shared_ptr<Range>> *entityMapRow =
nullptr,
278 const map<std::string, boost::shared_ptr<Range>> *entityMapCol =
nullptr,
298 const std::vector<std::string> add_row_problems,
299 const std::vector<std::string> add_col_problems,
300 const bool square_matrix =
true,
int verb = 1);
323 const std::string problem_for_rows,
325 const std::string problem_for_cols,
326 bool copy_cols,
int verb =
VERBOSE);
399 bool part_from_moab =
false,
400 int low_proc = -1,
int hi_proc = -1,
445 const std::string &fe_name,
463 const std::string &fe_name,
464 PetscLayout *layout)
const;
490 const std::string problem_name,
const std::string
field_name,
491 const Range ents,
const int lo_coeff = 0,
493 const int hi_order = 100,
int verb =
VERBOSE,
const bool debug =
false);
501 const std::string problem_name,
const std::string
field_name,
502 const Range ents,
const int lo_coeff = 0,
504 const int hi_order = 100,
int verb =
VERBOSE,
const bool debug =
false);
524 const std::string problem_name,
const std::string
field_name,
526 Range *ents_ptr =
nullptr,
const int lo_coeff = 0,
528 const int hi_order = 100,
int verb =
VERBOSE,
const bool debug =
false);
536 const std::string problem_name,
const std::string
field_name,
538 Range *ents_ptr =
nullptr,
const int lo_coeff = 0,
540 const int hi_order = 100,
int verb =
VERBOSE,
const bool debug =
false);
560 std::vector<boost::weak_ptr<NumeredDofEntity>> &vec_dof_view,
587 std::vector<boost::weak_ptr<NumeredDofEntity>> &vec_dof_view,
589 const std::string problem_name,
RowColData rc,
592 const int lo_order = 0,
const int hi_order = 100,
int verb =
VERBOSE,
593 const bool debug =
false
614 std::vector<unsigned char> &
marker)
const;
621 std::vector<unsigned char> &
marker)
const {
645 const int hi,
const enum MarkOP op,
646 const unsigned char c,
647 std::vector<unsigned char> &
marker)
const;
666 std::vector<boost::weak_ptr<NumeredDofEntity>> &vec_dof_view,
667 const enum MarkOP op, std::vector<unsigned char> &
marker)
const;
684 const std::string row_field,
685 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 partitionGhostDofs(const std::string name, int verb=VERBOSE)
determine ghost nodes
MoFEMErrorCode printPartitionedProblem(const Problem *problem_ptr, int verb=VERBOSE)
Print partition information for debugging.
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.
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 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 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 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 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 partitionProblem(const std::string name, int verb=VERBOSE)
partition problem dofs (collective)
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 partitionGhostDofsOnDistributedMesh(const std::string name, int verb=VERBOSE)
determine ghost nodes on distributed meshes
MoFEMErrorCode getProblemElementsLayout(const std::string name, const std::string &fe_name, PetscLayout *layout) const
Get layout of elements in the problem.
MoFEMErrorCode getFEMeshset(const std::string prb_name, const std::string &fe_name, EntityHandle *meshset) const
Create finite element meshset for the 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 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 debugPartitionedProblem(const Problem *problem_ptr, int verb=VERBOSE)
Debug partition information.
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 getOptions()
Get command line options for ProblemsManager.
auto marker
set bit to marker
const double c
speed of light (cm/ns)
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.
PetscLogEvent MOFEM_EVENT_ProblemsManager
virtual ~ProblemsManager()=default
PetscBool buildProblemFromFields
PetscBool synchroniseProblemEntities
DOFs in fields, not from DOFs on elements.
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.
base class for all interface classes