v0.10.0
Public Types | Public Member Functions | Public Attributes | Static Public Attributes | List of all members
MoFEM::PetscData Struct Reference

#include <src/interfaces/LoopMethods.hpp>

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

Public Types

enum  DataContext {
  CTX_SET_NONE = 0, CTX_SET_F = 1 << 0, CTX_SET_A = 1 << 1, CTX_SET_B = 1 << 2,
  CTX_SET_X = 1 << 3, CTX_SET_X_T = 1 << 4, CTX_SET_X_TT = 1 << 6, CTX_SET_TIME = 1 << 7
}
 
using Switches = std::bitset< 8 >
 

Public Member Functions

MoFEMErrorCode query_interface (const MOFEMuuid &uuid, UnknownInterface **iface) const
 
 PetscData ()
 
virtual ~PetscData ()=default
 
- 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 ()=default
 
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

Switches data_ctx
 
Vec f
 
Mat A
 
Mat B
 
Vec x
 
Vec x_t
 
Vec x_tt
 

Static Public Attributes

static constexpr Switches CtxSetNone = PetscData::Switches(CTX_SET_NONE)
 
static constexpr Switches CtxSetF = PetscData::Switches(CTX_SET_F)
 
static constexpr Switches CtxSetA = PetscData::Switches(CTX_SET_A)
 
static constexpr Switches CtxSetB = PetscData::Switches(CTX_SET_B)
 
static constexpr Switches CtxSetX = PetscData::Switches(CTX_SET_X)
 
static constexpr Switches CtxSetX_T = PetscData::Switches(CTX_SET_X_T)
 
static constexpr Switches CtxSetX_TT = PetscData::Switches(CTX_SET_X_TT)
 
static constexpr Switches CtxSetTime = PetscData::Switches(CTX_SET_TIME)
 

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

Definition at line 39 of file LoopMethods.hpp.

Member Typedef Documentation

◆ Switches

using MoFEM::PetscData::Switches = std::bitset<8>

Definition at line 59 of file LoopMethods.hpp.

Member Enumeration Documentation

◆ DataContext

Enumerator
CTX_SET_NONE 
CTX_SET_F 
CTX_SET_A 
CTX_SET_B 
CTX_SET_X 
CTX_SET_X_T 
CTX_SET_X_TT 
CTX_SET_TIME 

Definition at line 48 of file LoopMethods.hpp.

Constructor & Destructor Documentation

◆ PetscData()

MoFEM::PetscData::PetscData ( )

Definition at line 43 of file LoopMethods.cpp.

44  : f(PETSC_NULL), A(PETSC_NULL), B(PETSC_NULL), x(PETSC_NULL),
45  x_t(PETSC_NULL), x_tt(PETSC_NULL) {}

◆ ~PetscData()

virtual MoFEM::PetscData::~PetscData ( )
virtualdefault

Member Function Documentation

◆ query_interface()

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

Implements MoFEM::UnknownInterface.

Reimplemented in MoFEM::DofMethod, MoFEM::EntityMethod, MoFEM::FEMethod, MoFEM::BasicMethod, MoFEM::TSMethod, MoFEM::SnesMethod, and MoFEM::KspMethod.

Definition at line 33 of file LoopMethods.cpp.

34  {
36  if (uuid == IDD_MOFEMPetscDataMethod) {
37  *iface = const_cast<PetscData *>(this);
39  }
40  SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY, "unknown interface");
41  }
static const MOFEMuuid IDD_MOFEMPetscDataMethod
Definition: LoopMethods.hpp:24
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:509
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:516

Member Data Documentation

◆ A

Mat MoFEM::PetscData::A

Definition at line 73 of file LoopMethods.hpp.

◆ B

Mat MoFEM::PetscData::B

Definition at line 74 of file LoopMethods.hpp.

◆ CtxSetA

constexpr PetscData::Switches MoFEM::PetscData::CtxSetA = PetscData::Switches(CTX_SET_A)
static

Definition at line 63 of file LoopMethods.hpp.

◆ CtxSetB

constexpr PetscData::Switches MoFEM::PetscData::CtxSetB = PetscData::Switches(CTX_SET_B)
static

Definition at line 64 of file LoopMethods.hpp.

◆ CtxSetF

constexpr PetscData::Switches MoFEM::PetscData::CtxSetF = PetscData::Switches(CTX_SET_F)
static

Definition at line 62 of file LoopMethods.hpp.

◆ CtxSetNone

constexpr PetscData::Switches MoFEM::PetscData::CtxSetNone = PetscData::Switches(CTX_SET_NONE)
static

Definition at line 61 of file LoopMethods.hpp.

◆ CtxSetTime

constexpr PetscData::Switches MoFEM::PetscData::CtxSetTime = PetscData::Switches(CTX_SET_TIME)
static

Definition at line 68 of file LoopMethods.hpp.

◆ CtxSetX

constexpr PetscData::Switches MoFEM::PetscData::CtxSetX = PetscData::Switches(CTX_SET_X)
static

Definition at line 65 of file LoopMethods.hpp.

◆ CtxSetX_T

constexpr PetscData::Switches MoFEM::PetscData::CtxSetX_T = PetscData::Switches(CTX_SET_X_T)
static

Definition at line 66 of file LoopMethods.hpp.

◆ CtxSetX_TT

constexpr PetscData::Switches MoFEM::PetscData::CtxSetX_TT = PetscData::Switches(CTX_SET_X_TT)
static

Definition at line 67 of file LoopMethods.hpp.

◆ data_ctx

Switches MoFEM::PetscData::data_ctx

Definition at line 70 of file LoopMethods.hpp.

◆ f

Vec MoFEM::PetscData::f

Definition at line 72 of file LoopMethods.hpp.

◆ x

Vec MoFEM::PetscData::x
Examples
prism_elements_from_surface.cpp.

Definition at line 75 of file LoopMethods.hpp.

◆ x_t

Vec MoFEM::PetscData::x_t

Definition at line 76 of file LoopMethods.hpp.

◆ x_tt

Vec MoFEM::PetscData::x_tt

Definition at line 77 of file LoopMethods.hpp.


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