v0.15.0
Loading...
Searching...
No Matches
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_DX = 1 << 4 , CTX_SET_X_T = 1 << 5 , CTX_SET_X_TT = 1 << 6 ,
  CTX_SET_TIME = 1 << 7
}
 
using Switches = std::bitset<8>
 

Public Member Functions

MoFEMErrorCode query_interface (boost::typeindex::type_index type_index, UnknownInterface **iface) const
 
 PetscData ()
 
virtual ~PetscData ()=default
 
MoFEMErrorCode copyPetscData (const PetscData &petsc_data)
 
- Public Member Functions inherited from MoFEM::UnknownInterface
template<class IFACE >
MoFEMErrorCode registerInterface (bool error_if_registration_failed=true)
 Register interface.
 
template<class IFACE >
MoFEMErrorCode getInterface (IFACE *&iface) const
 Get interface reference to pointer of interface.
 
template<class IFACE >
MoFEMErrorCode getInterface (IFACE **const iface) const
 Get interface pointer to pointer of interface.
 
template<class IFACE , typename boost::enable_if< boost::is_pointer< IFACE >, int >::type = 0>
IFACE getInterface () const
 Get interface pointer to pointer of interface.
 
template<class IFACE , typename boost::enable_if< boost::is_reference< IFACE >, int >::type = 0>
IFACE getInterface () const
 Get reference to interface.
 
template<class IFACE >
IFACE * getInterface () const
 Function returning pointer to interface.
 
virtual ~UnknownInterface ()=default
 

Public Attributes

Switches data_ctx
 
Vec f
 
Mat A
 
Mat B
 
Vec x
 
Vec dx
 
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 CtxSetDX = PetscData::Switches(CTX_SET_DX)
 
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

- Static Public Member Functions inherited from MoFEM::UnknownInterface
static MoFEMErrorCode getLibVersion (Version &version)
 Get library version.
 
static MoFEMErrorCode getFileVersion (moab::Interface &moab, Version &version)
 Get database major version.
 
static MoFEMErrorCode setFileVersion (moab::Interface &moab, Version version=Version(MoFEM_VERSION_MAJOR, MoFEM_VERSION_MINOR, MoFEM_VERSION_BUILD))
 Get database major version.
 
static MoFEMErrorCode getInterfaceVersion (Version &version)
 Get database major version.
 

Detailed Description

Definition at line 14 of file LoopMethods.hpp.

Member Typedef Documentation

◆ Switches

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

Definition at line 35 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_DX 
CTX_SET_X_T 
CTX_SET_X_TT 
CTX_SET_TIME 

Definition at line 23 of file LoopMethods.hpp.

23 {
24 CTX_SET_NONE = 0,
25 CTX_SET_F = 1 << 0,
26 CTX_SET_A = 1 << 1,
27 CTX_SET_B = 1 << 2,
28 CTX_SET_X = 1 << 3,
29 CTX_SET_DX = 1 << 4,
30 CTX_SET_X_T = 1 << 5,
31 CTX_SET_X_TT = 1 << 6,
32 CTX_SET_TIME = 1 << 7
33 };

Constructor & Destructor Documentation

◆ PetscData()

MoFEM::PetscData::PetscData ( )

Definition at line 27 of file LoopMethods.cpp.

28 : data_ctx(PetscData::CtxSetNone), f(PETSC_NULLPTR), A(PETSC_NULLPTR),
29 B(PETSC_NULLPTR), x(PETSC_NULLPTR), dx(PETSC_NULLPTR), x_t(PETSC_NULLPTR),
30 x_tt(PETSC_NULLPTR) {}
static constexpr Switches CtxSetNone

◆ ~PetscData()

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

Member Function Documentation

◆ copyPetscData()

MoFEMErrorCode MoFEM::PetscData::copyPetscData ( const PetscData & petsc_data)

Definition at line 32 of file LoopMethods.cpp.

32 {
33 this->data_ctx = petsc_data.data_ctx;
34 this->f = petsc_data.f;
35 this->A = petsc_data.A;
36 this->B = petsc_data.B;
37 this->x = petsc_data.x;
38 this->dx = petsc_data.dx;
39 this->x_t = petsc_data.x_t;
40 this->x_tt = petsc_data.x_tt;
41 return 0;
42}

◆ query_interface()

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

Implements MoFEM::UnknownInterface.

Reimplemented in MoFEM::SnesMethod, MoFEM::TaoMethod, and MoFEM::TSMethod.

Definition at line 21 of file LoopMethods.cpp.

22 {
23 *iface = const_cast<PetscData *>(this);
24 return 0;
25}

Member Data Documentation

◆ A

Mat MoFEM::PetscData::A

Definition at line 52 of file LoopMethods.hpp.

◆ B

Mat MoFEM::PetscData::B
Examples
lorentz_force.cpp.

Definition at line 53 of file LoopMethods.hpp.

◆ CtxSetA

PetscData::Switches MoFEM::PetscData::CtxSetA = PetscData::Switches(CTX_SET_A)
staticconstexpr

Definition at line 39 of file LoopMethods.hpp.

◆ CtxSetB

PetscData::Switches MoFEM::PetscData::CtxSetB = PetscData::Switches(CTX_SET_B)
staticconstexpr

Definition at line 40 of file LoopMethods.hpp.

◆ CtxSetDX

Switches MoFEM::PetscData::CtxSetDX = PetscData::Switches(CTX_SET_DX)
staticconstexpr

Definition at line 42 of file LoopMethods.hpp.

◆ CtxSetF

PetscData::Switches MoFEM::PetscData::CtxSetF = PetscData::Switches(CTX_SET_F)
staticconstexpr

Definition at line 38 of file LoopMethods.hpp.

◆ CtxSetNone

PetscData::Switches MoFEM::PetscData::CtxSetNone = PetscData::Switches(CTX_SET_NONE)
staticconstexpr

Definition at line 37 of file LoopMethods.hpp.

◆ CtxSetTime

PetscData::Switches MoFEM::PetscData::CtxSetTime = PetscData::Switches(CTX_SET_TIME)
staticconstexpr

Definition at line 45 of file LoopMethods.hpp.

◆ CtxSetX

PetscData::Switches MoFEM::PetscData::CtxSetX = PetscData::Switches(CTX_SET_X)
staticconstexpr

Definition at line 41 of file LoopMethods.hpp.

◆ CtxSetX_T

PetscData::Switches MoFEM::PetscData::CtxSetX_T = PetscData::Switches(CTX_SET_X_T)
staticconstexpr

Definition at line 43 of file LoopMethods.hpp.

◆ CtxSetX_TT

PetscData::Switches MoFEM::PetscData::CtxSetX_TT = PetscData::Switches(CTX_SET_X_TT)
staticconstexpr

Definition at line 44 of file LoopMethods.hpp.

◆ data_ctx

Switches MoFEM::PetscData::data_ctx

Definition at line 47 of file LoopMethods.hpp.

◆ dx

Vec MoFEM::PetscData::dx

Definition at line 55 of file LoopMethods.hpp.

◆ f

Vec MoFEM::PetscData::f

Definition at line 51 of file LoopMethods.hpp.

◆ x

Vec MoFEM::PetscData::x
Examples
prism_elements_from_surface.cpp, and simple_elasticity.cpp.

Definition at line 54 of file LoopMethods.hpp.

◆ x_t

Vec MoFEM::PetscData::x_t

Definition at line 56 of file LoopMethods.hpp.

◆ x_tt

Vec MoFEM::PetscData::x_tt

Definition at line 57 of file LoopMethods.hpp.


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