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

data structure for TS (time stepping) context More...

#include <src/interfaces/LoopMethods.hpp>

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

Public Types

enum  TSContext {
  CTX_TSSETRHSFUNCTION, CTX_TSSETRHSJACOBIAN, CTX_TSSETIFUNCTION, CTX_TSSETIJACOBIAN,
  CTX_TSTSMONITORSET, CTX_TSNONE
}
 

Public Member Functions

MoFEMErrorCode query_interface (boost::typeindex::type_index type_index, UnknownInterface **iface) const
 
 TSMethod ()
 
virtual ~TSMethod ()=default
 
MoFEMErrorCode copyTs (const TSMethod &ts)
 Copy TS solver data. More...
 

Public Attributes

TS ts
 time solver More...
 
TSContext ts_ctx
 
PetscInt ts_step
 time step number More...
 
PetscReal ts_a
 shift for U_t (see PETSc Time Solver) More...
 
PetscReal ts_aa
 shift for U_tt shift for U_tt More...
 
PetscReal ts_t
 time More...
 
PetscReal ts_dt
 time step size More...
 
Vec & ts_u
 state vector More...
 
Vec & ts_u_t
 time derivative of state vector More...
 
Vec & ts_u_tt
 second time derivative of state vector More...
 
Vec & ts_F
 residual vector More...
 
Mat & ts_A
 
Mat & ts_B
 Preconditioner for ts_A. More...
 

Additional Inherited Members

- Protected Types inherited from MoFEM::PetscData
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 >
 
- Protected Member Functions inherited from MoFEM::PetscData
 PetscData ()
 
virtual ~PetscData ()=default
 
MoFEMErrorCode copyPetscData (const PetscData &petsc_data)
 
- Protected 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
 
- Static Protected 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...
 
- Protected Attributes inherited from MoFEM::PetscData
Switches data_ctx
 
Vec f
 
Mat A
 
Mat B
 
Vec x
 
Vec x_t
 
Vec x_tt
 
- Static Protected Attributes inherited from MoFEM::PetscData
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)
 

Detailed Description

data structure for TS (time stepping) context

Structure stores context data which are set in functions run by PETSc Time Stepping functions.

Definition at line 134 of file LoopMethods.hpp.

Member Enumeration Documentation

◆ TSContext

Enumerator
CTX_TSSETRHSFUNCTION 
CTX_TSSETRHSJACOBIAN 
CTX_TSSETIFUNCTION 
CTX_TSSETIJACOBIAN 
CTX_TSTSMONITORSET 
CTX_TSNONE 

Definition at line 139 of file LoopMethods.hpp.

Constructor & Destructor Documentation

◆ TSMethod()

MoFEM::TSMethod::TSMethod ( )

◆ ~TSMethod()

virtual MoFEM::TSMethod::~TSMethod ( )
virtualdefault

Member Function Documentation

◆ copyTs()

MoFEMErrorCode MoFEM::TSMethod::copyTs ( const TSMethod ts)

Copy TS solver data.

Definition at line 96 of file LoopMethods.cpp.

96  {
99  this->ts_ctx = ts.ts_ctx;
100  this->ts = ts.ts;
101  this->ts_step = ts.ts_step;
102  this->ts_a = ts.ts_a;
103  this->ts_t = ts.ts_t;
104  this->ts_dt = ts.ts_dt;
106 }

◆ query_interface()

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

Reimplemented from MoFEM::PetscData.

Reimplemented in MoFEM::DofMethod, MoFEM::EntityMethod, MoFEM::FEMethod, and MoFEM::BasicMethod.

Definition at line 85 of file LoopMethods.cpp.

86  {
87  *iface = const_cast<TSMethod *>(this);
88  return 0;
89 }

Member Data Documentation

◆ ts

TS MoFEM::TSMethod::ts

time solver

Examples
UnsaturatedFlow.hpp.

Definition at line 155 of file LoopMethods.hpp.

◆ ts_a

PetscReal MoFEM::TSMethod::ts_a

shift for U_t (see PETSc Time Solver)

Examples
UnsaturatedFlow.hpp.

Definition at line 160 of file LoopMethods.hpp.

◆ ts_A

Mat& MoFEM::TSMethod::ts_A

Jacobian of G(U) = F(t,U,W+v*U,W'+a*U), equivalent to dF/dU + v*dF/dU_t + a*dF/dU_tt

Definition at line 170 of file LoopMethods.hpp.

◆ ts_aa

PetscReal MoFEM::TSMethod::ts_aa

shift for U_tt shift for U_tt

Definition at line 161 of file LoopMethods.hpp.

◆ ts_B

Mat& MoFEM::TSMethod::ts_B

Preconditioner for ts_A.

Examples
UnsaturatedFlow.hpp.

Definition at line 172 of file LoopMethods.hpp.

◆ ts_ctx

TSContext MoFEM::TSMethod::ts_ctx
Examples
nonlinear_dynamics.cpp.

Definition at line 157 of file LoopMethods.hpp.

◆ ts_dt

PetscReal MoFEM::TSMethod::ts_dt

time step size

Definition at line 163 of file LoopMethods.hpp.

◆ ts_F

Vec& MoFEM::TSMethod::ts_F

residual vector

Examples
UnsaturatedFlow.hpp.

Definition at line 168 of file LoopMethods.hpp.

◆ ts_step

PetscInt MoFEM::TSMethod::ts_step

time step number

Examples
free_surface.cpp.

Definition at line 159 of file LoopMethods.hpp.

◆ ts_t

PetscReal MoFEM::TSMethod::ts_t

time

Examples
EshelbianOperators.cpp, free_surface.cpp, and UnsaturatedFlow.hpp.

Definition at line 162 of file LoopMethods.hpp.

◆ ts_u

Vec& MoFEM::TSMethod::ts_u

state vector

Definition at line 165 of file LoopMethods.hpp.

◆ ts_u_t

Vec& MoFEM::TSMethod::ts_u_t

time derivative of state vector

Definition at line 166 of file LoopMethods.hpp.

◆ ts_u_tt

Vec& MoFEM::TSMethod::ts_u_tt

second time derivative of state vector

Definition at line 167 of file LoopMethods.hpp.


The documentation for this struct was generated from the following files:
MoFEMFunctionReturnHot
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:447
MoFEM::TSMethod::TSMethod
TSMethod()
Definition: LoopMethods.cpp:91
MoFEM::TSMethod::ts_a
PetscReal ts_a
shift for U_t (see PETSc Time Solver)
Definition: LoopMethods.hpp:160
MoFEM::PetscData::x
Vec x
Definition: LoopMethods.hpp:51
MoFEM::TSMethod::ts_F
Vec & ts_F
residual vector
Definition: LoopMethods.hpp:168
MoFEM::PetscData::copyPetscData
MoFEMErrorCode copyPetscData(const PetscData &petsc_data)
Definition: LoopMethods.cpp:31
MoFEM::PetscData::x_tt
Vec x_tt
Definition: LoopMethods.hpp:53
MoFEM::PetscData::B
Mat B
Definition: LoopMethods.hpp:50
MoFEM::TSMethod::CTX_TSTSMONITORSET
@ CTX_TSTSMONITORSET
Definition: LoopMethods.hpp:144
MoFEM::TSMethod::CTX_TSSETRHSJACOBIAN
@ CTX_TSSETRHSJACOBIAN
Definition: LoopMethods.hpp:141
MoFEM::TSMethod::ts_A
Mat & ts_A
Definition: LoopMethods.hpp:170
CHKERR
#define CHKERR
Inline error check.
Definition: definitions.h:535
MoFEM::TSMethod::ts
TS ts
time solver
Definition: LoopMethods.hpp:155
MoFEM::TSMethod::CTX_TSSETIJACOBIAN
@ CTX_TSSETIJACOBIAN
Definition: LoopMethods.hpp:143
MoFEM::PetscData::A
Mat A
Definition: LoopMethods.hpp:49
MoFEM::TSMethod::ts_u_t
Vec & ts_u_t
time derivative of state vector
Definition: LoopMethods.hpp:166
MoFEM::TSMethod::CTX_TSNONE
@ CTX_TSNONE
Definition: LoopMethods.hpp:145
MoFEM::TSMethod::ts_ctx
TSContext ts_ctx
Definition: LoopMethods.hpp:157
MoFEM::PetscData::f
Vec f
Definition: LoopMethods.hpp:48
MoFEM::TSMethod::ts_step
PetscInt ts_step
time step number
Definition: LoopMethods.hpp:159
MoFEM::TSMethod::ts_t
PetscReal ts_t
time
Definition: LoopMethods.hpp:162
MoFEM::TSMethod::ts_u
Vec & ts_u
state vector
Definition: LoopMethods.hpp:165
MoFEM::PetscData::x_t
Vec x_t
Definition: LoopMethods.hpp:52
MoFEM::TSMethod::CTX_TSSETIFUNCTION
@ CTX_TSSETIFUNCTION
Definition: LoopMethods.hpp:142
MoFEMFunctionBeginHot
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:440
MoFEM::TSMethod::ts_dt
PetscReal ts_dt
time step size
Definition: LoopMethods.hpp:163
MoFEM::TSMethod::ts_B
Mat & ts_B
Preconditioner for ts_A.
Definition: LoopMethods.hpp:172
MoFEM::TSMethod::ts_u_tt
Vec & ts_u_tt
second time derivative of state vector
Definition: LoopMethods.hpp:167
MoFEM::TSMethod::CTX_TSSETRHSFUNCTION
@ CTX_TSSETRHSFUNCTION
Definition: LoopMethods.hpp:140