v0.14.0
Public Member Functions | Public Attributes | List of all members
MoFEM::DMCtx Struct Reference

PETSc Discrete Manager data structure. More...

#include <src/petsc/DMMoFEM.hpp>

Inheritance diagram for MoFEM::DMCtx:
[legend]
Collaboration diagram for MoFEM::DMCtx:
[legend]

Public Member Functions

MoFEMErrorCode query_interface (boost::typeindex::type_index type_index, UnknownInterface **iface) const
 
 DMCtx ()
 
virtual ~DMCtx ()=default
 
- 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 refernce 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

InterfacemField_ptr
 MoFEM interface. More...
 
PetscBool isProblemBuild
 True if problem is build. More...
 
std::string problemName
 Problem name. More...
 
PetscBool isPartitioned
 true if read mesh is on parts More...
 
PetscBool isSquareMatrix
 true if rows equals to cols More...
 
int rAnk
 
int sIze
 
const ProblemproblemPtr
 pinter to problem data structure More...
 
PetscBool isSubDM
 
std::vector< std::string > rowFields
 
std::vector< std::string > colFields
 
const ProblemproblemMainOfSubPtr
 pinter to main problem to sub-problem More...
 
PetscBool isCompDM
 
std::vector< std::string > rowCompPrb
 
std::vector< std::string > colCompPrb
 
std::map< std::string, boost::shared_ptr< Range > > mapTypeRow
 
std::map< std::string, boost::shared_ptr< Range > > mapTypeCol
 
PetscBool destroyProblem
 If true destroy problem with DM. More...
 
int verbosity
 verbosity More...
 
int referenceNumber
 
boost::shared_ptr< KspCtxkspCtx
 data structure KSP More...
 
boost::shared_ptr< SnesCtxsnesCtx
 data structure SNES More...
 
boost::shared_ptr< TsCtxtsCtx
 data structure for TS solver More...
 

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...
 

Detailed Description

PETSc Discrete Manager data structure.

This structure should not be accessed or modified by user. Is not available from outside MoFEM DM manager. However user can inherit dat class and add data for additional functionality.

This is part of implementation for PETSc interface, see more details in http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/DM/index.html

Definition at line 944 of file DMMoFEM.hpp.

Constructor & Destructor Documentation

◆ DMCtx()

MoFEM::DMCtx::DMCtx ( )

Definition at line 18 of file DMMoFEM.cpp.

19  : mField_ptr(PETSC_NULL), isProblemBuild(PETSC_FALSE),
20  isPartitioned(PETSC_FALSE), isSquareMatrix(PETSC_TRUE),
21  isSubDM(PETSC_FALSE), isCompDM(PETSC_FALSE), destroyProblem(PETSC_FALSE),
23 
24  if (!LogManager::checkIfChannelExist("DMWORLD")) {
25  auto core_log = logging::core::get();
26  core_log->add_sink(
28  core_log->add_sink(
30  core_log->add_sink(
32  LogManager::setLog("DMWORLD");
33  LogManager::setLog("DMSYNC");
34  LogManager::setLog("DMSELF");
35  MOFEM_LOG_TAG("DMWORLD", "DM");
36  MOFEM_LOG_TAG("DMSYNC", "DM");
37  MOFEM_LOG_TAG("DMSELF", "DM");
38  }
39 }

◆ ~DMCtx()

virtual MoFEM::DMCtx::~DMCtx ( )
virtualdefault

Member Function Documentation

◆ query_interface()

MoFEMErrorCode MoFEM::DMCtx::query_interface ( boost::typeindex::type_index  type_index,
UnknownInterface **  iface 
) const
virtual

Implements MoFEM::UnknownInterface.

Reimplemented in DMMGViaApproxOrdersCtx.

Definition at line 41 of file DMMoFEM.cpp.

42  {
43  *iface = const_cast<DMCtx *>(this);
44  return 0;
45 }

Member Data Documentation

◆ colCompPrb

std::vector<std::string> MoFEM::DMCtx::colCompPrb

Definition at line 970 of file DMMoFEM.hpp.

◆ colFields

std::vector<std::string> MoFEM::DMCtx::colFields

Definition at line 965 of file DMMoFEM.hpp.

◆ destroyProblem

PetscBool MoFEM::DMCtx::destroyProblem

If true destroy problem with DM.

Definition at line 974 of file DMMoFEM.hpp.

◆ isCompDM

PetscBool MoFEM::DMCtx::isCompDM

Definition at line 968 of file DMMoFEM.hpp.

◆ isPartitioned

PetscBool MoFEM::DMCtx::isPartitioned

true if read mesh is on parts

Definition at line 954 of file DMMoFEM.hpp.

◆ isProblemBuild

PetscBool MoFEM::DMCtx::isProblemBuild

True if problem is build.

Definition at line 950 of file DMMoFEM.hpp.

◆ isSquareMatrix

PetscBool MoFEM::DMCtx::isSquareMatrix

true if rows equals to cols

Definition at line 955 of file DMMoFEM.hpp.

◆ isSubDM

PetscBool MoFEM::DMCtx::isSubDM

Definition at line 963 of file DMMoFEM.hpp.

◆ kspCtx

boost::shared_ptr<KspCtx> MoFEM::DMCtx::kspCtx

data structure KSP

Definition at line 982 of file DMMoFEM.hpp.

◆ mapTypeCol

std::map<std::string, boost::shared_ptr<Range> > MoFEM::DMCtx::mapTypeCol

Definition at line 972 of file DMMoFEM.hpp.

◆ mapTypeRow

std::map<std::string, boost::shared_ptr<Range> > MoFEM::DMCtx::mapTypeRow

Definition at line 971 of file DMMoFEM.hpp.

◆ mField_ptr

Interface* MoFEM::DMCtx::mField_ptr

MoFEM interface.

Definition at line 949 of file DMMoFEM.hpp.

◆ problemMainOfSubPtr

const Problem* MoFEM::DMCtx::problemMainOfSubPtr

pinter to main problem to sub-problem

Definition at line 966 of file DMMoFEM.hpp.

◆ problemName

std::string MoFEM::DMCtx::problemName

Problem name.

Definition at line 951 of file DMMoFEM.hpp.

◆ problemPtr

const Problem* MoFEM::DMCtx::problemPtr

pinter to problem data structure

Definition at line 960 of file DMMoFEM.hpp.

◆ rAnk

int MoFEM::DMCtx::rAnk

Definition at line 957 of file DMMoFEM.hpp.

◆ referenceNumber

int MoFEM::DMCtx::referenceNumber

Definition at line 980 of file DMMoFEM.hpp.

◆ rowCompPrb

std::vector<std::string> MoFEM::DMCtx::rowCompPrb

Definition at line 969 of file DMMoFEM.hpp.

◆ rowFields

std::vector<std::string> MoFEM::DMCtx::rowFields

Definition at line 964 of file DMMoFEM.hpp.

◆ sIze

int MoFEM::DMCtx::sIze

Definition at line 957 of file DMMoFEM.hpp.

◆ snesCtx

boost::shared_ptr<SnesCtx> MoFEM::DMCtx::snesCtx

data structure SNES

Definition at line 983 of file DMMoFEM.hpp.

◆ tsCtx

boost::shared_ptr<TsCtx> MoFEM::DMCtx::tsCtx

data structure for TS solver

Definition at line 984 of file DMMoFEM.hpp.

◆ verbosity

int MoFEM::DMCtx::verbosity

verbosity

Definition at line 979 of file DMMoFEM.hpp.


The documentation for this struct was generated from the following files:
MoFEM::DMCtx::destroyProblem
PetscBool destroyProblem
If true destroy problem with DM.
Definition: DMMoFEM.hpp:974
MoFEM::LogManager::checkIfChannelExist
static bool checkIfChannelExist(const std::string channel)
Check if channel exist.
Definition: LogManager.cpp:404
MoFEM::DMCtx::referenceNumber
int referenceNumber
Definition: DMMoFEM.hpp:980
MoFEM::DMCtx::isCompDM
PetscBool isCompDM
Definition: DMMoFEM.hpp:968
MoFEM::LogManager::createSink
static boost::shared_ptr< SinkType > createSink(boost::shared_ptr< std::ostream > stream_ptr, std::string comm_filter)
Create a sink object.
Definition: LogManager.cpp:298
VERBOSE
@ VERBOSE
Definition: definitions.h:209
MoFEM::DMCtx::verbosity
int verbosity
verbosity
Definition: DMMoFEM.hpp:979
MoFEM::LogManager::getStrmSync
static boost::shared_ptr< std::ostream > getStrmSync()
Get the strm sync object.
Definition: LogManager.cpp:348
MoFEM::LogManager::getStrmWorld
static boost::shared_ptr< std::ostream > getStrmWorld()
Get the strm world object.
Definition: LogManager.cpp:344
MoFEM::DMCtx::isProblemBuild
PetscBool isProblemBuild
True if problem is build.
Definition: DMMoFEM.hpp:950
MoFEM::LogManager::getStrmSelf
static boost::shared_ptr< std::ostream > getStrmSelf()
Get the strm self object.
Definition: LogManager.cpp:340
MoFEM::DMCtx::isSquareMatrix
PetscBool isSquareMatrix
true if rows equals to cols
Definition: DMMoFEM.hpp:955
MOFEM_LOG_TAG
#define MOFEM_LOG_TAG(channel, tag)
Tag channel.
Definition: LogManager.hpp:339
MoFEM::DMCtx::isPartitioned
PetscBool isPartitioned
true if read mesh is on parts
Definition: DMMoFEM.hpp:954
MoFEM::DMCtx::DMCtx
DMCtx()
Definition: DMMoFEM.cpp:18
MoFEM::DMCtx::mField_ptr
Interface * mField_ptr
MoFEM interface.
Definition: DMMoFEM.hpp:949
MoFEM::DMCtx::isSubDM
PetscBool isSubDM
Definition: DMMoFEM.hpp:963
MoFEM::LogManager::setLog
static LoggerType & setLog(const std::string channel)
Set ans resset chanel logger.
Definition: LogManager.cpp:389