v0.8.16
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 (const MOFEMuuid &uuid, MoFEM::UnknownInterface **iface) const
 
 DMMGViaApproxOrdersCtx ()
 
virtual ~DMMGViaApproxOrdersCtx ()
 
MoFEMErrorCode destroyCoarseningIS ()
 
- Public Member Functions inherited from MoFEM::DMCtx
MoFEMErrorCode query_interface (const MOFEMuuid &uuid, UnknownInterface **iface) const
 
 DMCtx ()
 
virtual ~DMCtx ()
 
- Public Member Functions inherited from MoFEM::UnknownInterface
template<class IFACE >
MoFEMErrorCode registerInterface (const MOFEMuuid &uuid, bool error_if_registration_failed=true)
 Register interface. More...
 
template<class IFACE , bool VERIFY = false>
MoFEMErrorCode getInterface (const MOFEMuuid &uuid, IFACE *&iface) const
 Get interface by uuid and return reference to pointer of 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 ()
 
virtual MoFEMErrorCode getLibVersion (Version &version) const
 Get library version. More...
 
virtual const MoFEMErrorCode getFileVersion (moab::Interface &moab, Version &version) const
 Get database major version. More...
 
virtual MoFEMErrorCode getInterfaceVersion (Version &version) const
 Get database major version. More...
 
template<>
MoFEMErrorCode getInterface (const MOFEMuuid &uuid, UnknownInterface *&iface) const
 

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

- Protected Member Functions inherited from MoFEM::UnknownInterface
boost::typeindex::type_index getClassIdx (const MOFEMuuid &uid) const
 Get type name for interface Id. More...
 
MOFEMuuid getUId (const boost::typeindex::type_index &class_idx) const
 Get interface Id for class name. More...
 

Detailed Description

Structure for DM for multi-grid via approximation orders.

Definition at line 37 of file PCMGSetUpViaApproxOrders.hpp.

Constructor & Destructor Documentation

◆ DMMGViaApproxOrdersCtx()

DMMGViaApproxOrdersCtx::DMMGViaApproxOrdersCtx ( )

Definition at line 145 of file PCMGSetUpViaApproxOrders.cpp.

146  : MoFEM::DMCtx(), aO(PETSC_NULL) {
147  // std::cerr << "create dm\n";
148 }
PETSc Discrete Manager data structure.
Definition: DMMoFEM.hpp:737

◆ ~DMMGViaApproxOrdersCtx()

DMMGViaApproxOrdersCtx::~DMMGViaApproxOrdersCtx ( )
virtual

Definition at line 149 of file PCMGSetUpViaApproxOrders.cpp.

149  {
151  CHKERRABORT(PETSC_COMM_WORLD, ierr);
152 }

Member Function Documentation

◆ destroyCoarseningIS()

MoFEMErrorCode DMMGViaApproxOrdersCtx::destroyCoarseningIS ( )

Definition at line 154 of file PCMGSetUpViaApproxOrders.cpp.

154  {
156  for (unsigned int ii = 0; ii < coarseningIS.size(); ii++) {
157  if (coarseningIS[ii])
158  CHKERR ISDestroy(&coarseningIS[ii]);
159  }
160  for (unsigned int ii = 0; ii < kspOperators.size(); ii++) {
161  if (kspOperators[ii])
162  CHKERR MatDestroy(&kspOperators[ii]);
163  }
164  if (aO) {
165  CHKERR AODestroy(&aO);
166  }
167  coarseningIS.clear();
168  kspOperators.clear();
169  shellMatrixCtxPtr.clear();
171 }
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return() ...
Definition: definitions.h:459
boost::ptr_vector< PCMGSubMatrixCtx > shellMatrixCtxPtr
Shell sub-matrix context.
#define CHKERR
Inline error check.
Definition: definitions.h:578
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:403
std::vector< Mat > kspOperators
Get KSP operators.
std::vector< IS > coarseningIS
Coarsening IS.

◆ query_interface()

MoFEMErrorCode DMMGViaApproxOrdersCtx::query_interface ( const MOFEMuuid uuid,
MoFEM::UnknownInterface **  iface 
) const

Definition at line 174 of file PCMGSetUpViaApproxOrders.cpp.

175  {
177  *iface = NULL;
178  if (uuid == IDD_DMMGVIAAPPROXORDERSCTX) {
179  *iface = static_cast<DMMGViaApproxOrdersCtx *>(
180  const_cast<DMMGViaApproxOrdersCtx *>(this));
182  } else {
183  SETERRQ(PETSC_COMM_WORLD, MOFEM_DATA_INCONSISTENCY, "wrong interference");
184  }
185 
186  ierr = DMCtx::query_interface(uuid, iface);
187  CHKERRG(ierr);
189 }
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:483
static const MOFEMuuid IDD_DMMGVIAAPPROXORDERSCTX
#define CHKERRG(n)
Check error code of MoFEM/MOAB/PETSc function.
Definition: definitions.h:526
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return() ...
Definition: definitions.h:490
Structure for DM for multi-grid via approximation orders.

Member Data Documentation

◆ aO

AO DMMGViaApproxOrdersCtx::aO

Definition at line 46 of file PCMGSetUpViaApproxOrders.hpp.

◆ coarseningIS

std::vector<IS> DMMGViaApproxOrdersCtx::coarseningIS

Coarsening IS.

Definition at line 47 of file PCMGSetUpViaApproxOrders.hpp.

◆ kspOperators

std::vector<Mat> DMMGViaApproxOrdersCtx::kspOperators

Get KSP operators.

Definition at line 48 of file PCMGSetUpViaApproxOrders.hpp.

◆ shellMatrixCtxPtr

boost::ptr_vector<PCMGSubMatrixCtx> DMMGViaApproxOrdersCtx::shellMatrixCtxPtr

Shell sub-matrix context.

Definition at line 49 of file PCMGSetUpViaApproxOrders.hpp.


The documentation for this struct was generated from the following files: