v0.14.0
Public Member Functions | Public Attributes | List of all members
DMMGViaApproxOrdersCtx Struct Reference

Structure for DM for multi-grid via approximation orders. More...

#include <users_modules/basic_finite_elements/src/PCMGSetUpViaApproxOrders.hpp>

Inheritance diagram for DMMGViaApproxOrdersCtx:
[legend]
Collaboration diagram for DMMGViaApproxOrdersCtx:
[legend]

Public Member Functions

MoFEMErrorCode query_interface (boost::typeindex::type_index type_index, MoFEM::UnknownInterface **iface) const
 
 DMMGViaApproxOrdersCtx ()
 
virtual ~DMMGViaApproxOrdersCtx ()
 
MoFEMErrorCode destroyCoarseningIS ()
 
- Public Member Functions inherited from MoFEM::DMCtx
 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

AO aO
 
std::vector< IS > coarseningIS
 Coarsening IS. More...
 
std::vector< Mat > kspOperators
 Get KSP operators. More...
 
boost::ptr_vector< PCMGSubMatrixCtxshellMatrixCtxPtr
 Shell sub-matrix context. More...
 
- Public Attributes inherited from MoFEM::DMCtx
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

Structure for DM for multi-grid via approximation orders.

Definition at line 22 of file PCMGSetUpViaApproxOrders.hpp.

Constructor & Destructor Documentation

◆ DMMGViaApproxOrdersCtx()

DMMGViaApproxOrdersCtx::DMMGViaApproxOrdersCtx ( )

Definition at line 134 of file PCMGSetUpViaApproxOrders.cpp.

135  : MoFEM::DMCtx(), aO(PETSC_NULL) {
136  // std::cerr << "create dm\n";
137 }

◆ ~DMMGViaApproxOrdersCtx()

DMMGViaApproxOrdersCtx::~DMMGViaApproxOrdersCtx ( )
virtual

Definition at line 138 of file PCMGSetUpViaApproxOrders.cpp.

138  {
140  CHKERRABORT(PETSC_COMM_WORLD, ierr);
141 }

Member Function Documentation

◆ destroyCoarseningIS()

MoFEMErrorCode DMMGViaApproxOrdersCtx::destroyCoarseningIS ( )

Definition at line 143 of file PCMGSetUpViaApproxOrders.cpp.

143  {
145  for (unsigned int ii = 0; ii < coarseningIS.size(); ii++) {
146  if (coarseningIS[ii])
147  CHKERR ISDestroy(&coarseningIS[ii]);
148  }
149  for (unsigned int ii = 0; ii < kspOperators.size(); ii++) {
150  if (kspOperators[ii])
151  CHKERR MatDestroy(&kspOperators[ii]);
152  }
153  if (aO) {
154  CHKERR AODestroy(&aO);
155  }
156  coarseningIS.clear();
157  kspOperators.clear();
158  shellMatrixCtxPtr.clear();
160 }

◆ query_interface()

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

Reimplemented from MoFEM::DMCtx.

Definition at line 163 of file PCMGSetUpViaApproxOrders.cpp.

164  {
165  *iface = static_cast<DMMGViaApproxOrdersCtx *>(
166  const_cast<DMMGViaApproxOrdersCtx *>(this));
167  return 0;
168 }

Member Data Documentation

◆ aO

AO DMMGViaApproxOrdersCtx::aO

Definition at line 32 of file PCMGSetUpViaApproxOrders.hpp.

◆ coarseningIS

std::vector<IS> DMMGViaApproxOrdersCtx::coarseningIS

Coarsening IS.

Definition at line 33 of file PCMGSetUpViaApproxOrders.hpp.

◆ kspOperators

std::vector<Mat> DMMGViaApproxOrdersCtx::kspOperators

Get KSP operators.

Definition at line 34 of file PCMGSetUpViaApproxOrders.hpp.

◆ shellMatrixCtxPtr

boost::ptr_vector<PCMGSubMatrixCtx> DMMGViaApproxOrdersCtx::shellMatrixCtxPtr

Shell sub-matrix context.

Definition at line 36 of file PCMGSetUpViaApproxOrders.hpp.


The documentation for this struct was generated from the following files:
DMMGViaApproxOrdersCtx::shellMatrixCtxPtr
boost::ptr_vector< PCMGSubMatrixCtx > shellMatrixCtxPtr
Shell sub-matrix context.
Definition: PCMGSetUpViaApproxOrders.hpp:36
DMMGViaApproxOrdersCtx::kspOperators
std::vector< Mat > kspOperators
Get KSP operators.
Definition: PCMGSetUpViaApproxOrders.hpp:34
DMMGViaApproxOrdersCtx
Structure for DM for multi-grid via approximation orders.
Definition: PCMGSetUpViaApproxOrders.hpp:22
CHKERR
#define CHKERR
Inline error check.
Definition: definitions.h:535
DMMGViaApproxOrdersCtx::destroyCoarseningIS
MoFEMErrorCode destroyCoarseningIS()
Definition: PCMGSetUpViaApproxOrders.cpp:143
MoFEM::DMCtx
PETSc Discrete Manager data structure.
Definition: DMMoFEM.hpp:944
DMMGViaApproxOrdersCtx::coarseningIS
std::vector< IS > coarseningIS
Coarsening IS.
Definition: PCMGSetUpViaApproxOrders.hpp:33
MoFEM::Exceptions::ierr
static MoFEMErrorCodeGeneric< PetscErrorCode > ierr
Definition: Exceptions.hpp:76
DMMGViaApproxOrdersCtx::aO
AO aO
Definition: PCMGSetUpViaApproxOrders.hpp:32
MoFEMFunctionReturn
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:416
MoFEMFunctionBegin
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:346