Tempus  Version of the Day
Time Integration
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Tempus::StepperRKModifierXBase< Scalar > Class Template Referenceabstract

Base ModifierX for StepperRK. More...

#include <Tempus_StepperRKModifierXBase.hpp>

Inheritance diagram for Tempus::StepperRKModifierXBase< Scalar >:
Tempus::StepperRKAppAction< Scalar > Tempus::StepperRKModifierXDefault< Scalar >

Public Types

enum  MODIFIER_TYPE {
  X_BEGIN_STEP, X_BEGIN_STAGE, X_BEFORE_SOLVE, X_AFTER_SOLVE,
  X_BEFORE_EXPLICIT_EVAL, X_END_STAGE, X_END_STEP
}
 Indicates the location of application action (see algorithm). More...
 
- Public Types inherited from Tempus::StepperRKAppAction< Scalar >
enum  ACTION_LOCATION {
  BEGIN_STEP, BEGIN_STAGE, BEFORE_SOLVE, AFTER_SOLVE,
  BEFORE_EXPLICIT_EVAL, END_STAGE, END_STEP
}
 Indicates the location of application action (see algorithm). More...
 

Public Member Functions

virtual void modify (Teuchos::RCP< Thyra::VectorBase< Scalar > >, const Scalar, const Scalar, const int, const MODIFIER_TYPE modType)=0
 Modify solution based on the MODIFIER_TYPE. More...
 
- Public Member Functions inherited from Tempus::StepperRKAppAction< Scalar >
 StepperRKAppAction ()
 Constructor. More...
 
virtual ~StepperRKAppAction ()
 Destructor. More...
 

Private Member Functions

void execute (Teuchos::RCP< SolutionHistory< Scalar > > sh, Teuchos::RCP< StepperRKBase< Scalar > > stepper, const typename StepperRKAppAction< Scalar >::ACTION_LOCATION actLoc)
 Execute application action for RK Stepper. More...
 

Detailed Description

template<class Scalar>
class Tempus::StepperRKModifierXBase< Scalar >

Base ModifierX for StepperRK.

This class provides a means to modify just the solution values (i.e., $x$ and $dot{x}$), and nothing else, but time and timestep are also provided.

Users deriving from this class can access and change the solution during the timestep (e.g., limiting the solution for monoticity). It is expected that the user knows what changes are allowable without affecting the Stepper correctness, performance, accuracy and stability (i.e., USER BEWARE!!).

Below is the RK algorithm with the locations of the ModifierX calls italicized.

\begin{algorithm} \renewcommand{\thealgorithm}{} \caption{Backward Euler with modify calls indicated.} \begin{algorithmic}[1] \State \quad {\it modifierX.modify(x, time, dt, X\_BEGIN\_STEP)} \State Compute the predictor (e.g., apply stepper to $x_n$). \State \quad {\it modifierX.modify(x, time, dt, X\_BEFORE\_SOLVE)} \State Solve $\mathcal{F}_n(\dot{x}=(x_n-x_{n-1})/\Delta t_n, x_n, t_n)=0$ for $x_n$ \State \quad {\it modifierX.modify(x, time, dt, X\_AFTER\_SOLVE)} \State $\dot{x}_n \leftarrow (x_n-x_{n-1})/\Delta t_n$ \State \quad {\it modifierX.modify(x, time, dt, XDOT\_END\_STEP)} \end{algorithmic} \end{algorithm}

Definition at line 49 of file Tempus_StepperRKModifierXBase.hpp.

Member Enumeration Documentation

template<class Scalar>
enum Tempus::StepperRKModifierXBase::MODIFIER_TYPE

Indicates the location of application action (see algorithm).

Enumerator
X_BEGIN_STEP 

Modify $x$ at the beginning of the step.

X_BEGIN_STAGE 

Modify $x$ at the beginning of the stage.

X_BEFORE_SOLVE 

Modify $x$ before the implicit solve.

X_AFTER_SOLVE 

Modify $x$ after the implicit solve.

X_BEFORE_EXPLICIT_EVAL 

Modify $x$ before the explicit evaluation.

X_END_STAGE 

Modify $x$ at the end of the stage.

X_END_STEP 

Modify $x$ at the end of the step.

Definition at line 135 of file Tempus_StepperRKModifierXBase.hpp.

Member Function Documentation

template<class Scalar>
void Tempus::StepperRKModifierXBase< Scalar >::execute ( Teuchos::RCP< SolutionHistory< Scalar > >  sh,
Teuchos::RCP< StepperRKBase< Scalar > >  stepper,
const typename StepperRKAppAction< Scalar >::ACTION_LOCATION  actLoc 
)
inlineprivatevirtual

Execute application action for RK Stepper.

Implements Tempus::StepperRKAppAction< Scalar >.

Definition at line 67 of file Tempus_StepperRKModifierXBase.hpp.

template<class Scalar>
virtual void Tempus::StepperRKModifierXBase< Scalar >::modify ( Teuchos::RCP< Thyra::VectorBase< Scalar > >  ,
const Scalar  ,
const Scalar  ,
const int  ,
const MODIFIER_TYPE  modType 
)
pure virtual

Modify solution based on the MODIFIER_TYPE.


The documentation for this class was generated from the following file: