v0.14.0
DMCtxImpl.hpp
Go to the documentation of this file.
1 /** \file DMCtxImpl.hpp
2  \brief Implementation of DM context. You should not use it directly
3  */
4 
5 #ifndef __DMCTX_IMPL_H
6 #define __DMCTX_IMPL_H
7 
8 namespace MoFEM {
9 
10 struct DMCtxImpl : public DMCtx {
11 
12  DMCtxImpl();
13 
14  int useCount() { return referenceNumber; }
15  int incrementReference() { return ++referenceNumber; }
16 
17  int rAnk = -1; //< processor rank
18  int sIze = -1; //< communication size
19 
20  int verbosity = VERBOSE; ///< verbosity
21  int referenceNumber = 0; //< reference number
22 
23  // sub problem
24  PetscBool isSubDM = PETSC_FALSE;
25  std::vector<std::string> rowSubFields;
26  std::vector<std::string> colSubFields;
27  const Problem *problemMainOfSubPtr; ///< pointer to main problem to sub-problem
28 
29  PetscBool isCompDM = PETSC_FALSE;
30  std::vector<std::string> rowCompPrb;
31  std::vector<std::string> colCompPrb;
32  std::map<std::string, boost::shared_ptr<Range>> mapTypeRow;
33  std::map<std::string, boost::shared_ptr<Range>> mapTypeCol;
34 
35  // Options
36  PetscBool isPartitioned = PETSC_FALSE; ///< true if read mesh is on parts
37  PetscBool isSquareMatrix = PETSC_TRUE; ///< true if rows equals to cols
38  PetscBool destroyProblem = PETSC_FALSE; ///< If true destroy problem with DM
39  PetscBool isProblemBuild = PETSC_FALSE; ///< True if problem is build
40 
41  Interface *mField_ptr = nullptr; ///< MoFEM interface
42 
43  // pointer to data structures
44  const Problem *problemPtr = nullptr; ///< pointer to problem data structure
45  std::string problemName; ///< Problem name
46 
47  // schur block matrix
48  boost::shared_ptr<BlockStructure> blocMatDataPtr;
49  boost::shared_ptr<NestSchurData> nestedSchurDataPtr;
50 };
51 
52 } // namespace MoFEM
53 
54 #endif //__DMCTX_IMPL_H
MoFEM::DMCtxImpl::colSubFields
std::vector< std::string > colSubFields
Definition: DMCtxImpl.hpp:26
MoFEM::DMCtxImpl::colCompPrb
std::vector< std::string > colCompPrb
Definition: DMCtxImpl.hpp:31
MoFEM::DMCtxImpl::rAnk
int rAnk
Definition: DMCtxImpl.hpp:17
MoFEM::DMCtxImpl::incrementReference
int incrementReference()
Definition: DMCtxImpl.hpp:15
MoFEM::DMCtxImpl::isCompDM
PetscBool isCompDM
Definition: DMCtxImpl.hpp:29
MoFEM::DMCtxImpl::mapTypeRow
std::map< std::string, boost::shared_ptr< Range > > mapTypeRow
Definition: DMCtxImpl.hpp:32
MoFEM::DMCtxImpl::isPartitioned
PetscBool isPartitioned
true if read mesh is on parts
Definition: DMCtxImpl.hpp:36
MoFEM::DMCtxImpl::nestedSchurDataPtr
boost::shared_ptr< NestSchurData > nestedSchurDataPtr
Definition: DMCtxImpl.hpp:49
MoFEM::DMCtxImpl::problemName
std::string problemName
Problem name.
Definition: DMCtxImpl.hpp:45
MoFEM::DMCtxImpl::sIze
int sIze
Definition: DMCtxImpl.hpp:18
MoFEM::DeprecatedCoreInterface
Deprecated interface functions.
Definition: DeprecatedCoreInterface.hpp:16
VERBOSE
@ VERBOSE
Definition: definitions.h:222
MoFEM::DMCtxImpl
Definition: DMCtxImpl.hpp:10
MoFEM::DMCtxImpl::isSquareMatrix
PetscBool isSquareMatrix
true if rows equals to cols
Definition: DMCtxImpl.hpp:37
MoFEM
implementation of Data Operators for Forces and Sources
Definition: Common.hpp:10
MoFEM::DMCtxImpl::blocMatDataPtr
boost::shared_ptr< BlockStructure > blocMatDataPtr
Definition: DMCtxImpl.hpp:48
MoFEM::DMCtxImpl::rowSubFields
std::vector< std::string > rowSubFields
Definition: DMCtxImpl.hpp:25
MoFEM::DMCtxImpl::mField_ptr
Interface * mField_ptr
MoFEM interface.
Definition: DMCtxImpl.hpp:41
MoFEM::DMCtxImpl::destroyProblem
PetscBool destroyProblem
If true destroy problem with DM.
Definition: DMCtxImpl.hpp:38
MoFEM::DMCtxImpl::referenceNumber
int referenceNumber
Definition: DMCtxImpl.hpp:21
MoFEM::DMCtx
PETSc Discrete Manager data structure.
Definition: DMMoFEM.hpp:1012
MoFEM::DMCtxImpl::isSubDM
PetscBool isSubDM
Definition: DMCtxImpl.hpp:24
MoFEM::DMCtxImpl::rowCompPrb
std::vector< std::string > rowCompPrb
Definition: DMCtxImpl.hpp:30
MoFEM::DMCtxImpl::problemMainOfSubPtr
const Problem * problemMainOfSubPtr
pointer to main problem to sub-problem
Definition: DMCtxImpl.hpp:27
MoFEM::DMCtxImpl::DMCtxImpl
DMCtxImpl()
Definition: DMMoFEM.cpp:25
MoFEM::DMCtxImpl::isProblemBuild
PetscBool isProblemBuild
True if problem is build.
Definition: DMCtxImpl.hpp:39
MoFEM::Problem
keeps basic data about problem
Definition: ProblemsMultiIndices.hpp:54
MoFEM::DMCtxImpl::problemPtr
const Problem * problemPtr
pointer to problem data structure
Definition: DMCtxImpl.hpp:44
MoFEM::DMCtxImpl::mapTypeCol
std::map< std::string, boost::shared_ptr< Range > > mapTypeCol
Definition: DMCtxImpl.hpp:33
MoFEM::DMCtxImpl::verbosity
int verbosity
verbosity
Definition: DMCtxImpl.hpp:20
MoFEM::DMCtxImpl::useCount
int useCount()
Definition: DMCtxImpl.hpp:14