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

Base ModifierX for StepperForwardEuler. More...

#include <Tempus_StepperForwardEulerModifierXBase.hpp>

Inheritance diagram for Tempus::StepperForwardEulerModifierXBase< Scalar >:
Tempus::StepperForwardEulerAppAction< Scalar > Tempus::StepperForwardEulerModifierXDefault< Scalar >

Public Types

enum  MODIFIER_TYPE { X_BEGIN_STEP, X_BEFORE_EXPLICIT_EVAL, XDOT_END_STEP }
 Indicates the location of application action (see algorithm). More...
 
- Public Types inherited from Tempus::StepperForwardEulerAppAction< Scalar >
enum  ACTION_LOCATION { BEGIN_STEP, BEFORE_EXPLICIT_EVAL, 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 MODIFIER_TYPE modType)=0
 Modify solution based on the MODIFIER_TYPE. More...
 
- Public Member Functions inherited from Tempus::StepperForwardEulerAppAction< Scalar >
 StepperForwardEulerAppAction ()
 Constructor. More...
 
virtual ~StepperForwardEulerAppAction ()
 Destructor. More...
 

Private Member Functions

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

Detailed Description

template<class Scalar>
class Tempus::StepperForwardEulerModifierXBase< Scalar >

Base ModifierX for StepperForwardEuler.

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 ForwardEuler algorithm with the locations of the ModifierX calls italicized.

\begin{algorithm} \renewcommand{\thealgorithm}{} \caption{Forward Euler with the locations of the application actions indicated} \begin{algorithmic}[1] \State Start with $x_n$, $\Delta t_n$ \State {\it appAction.execute(solutionHistory, stepper, BEGIN\_STEP)} \State Form $f(x_{n},t_{n})$ \State {\it appAction.execute(solutionHistory, stepper, BEFORE\_EXPLICIT\_EVAL)} \State Form $x_n \leftarrow x_{n} + \Delta t_n f(x_{n},t_n)$ \State {\it appAction.execute(solutionHistory, stepper, END\_STEP)} \end{algorithmic} \end{algorithm}

Definition at line 49 of file Tempus_StepperForwardEulerModifierXBase.hpp.

Member Enumeration Documentation

Indicates the location of application action (see algorithm).

Enumerator
X_BEGIN_STEP 

Modify $x$ at the beginning of the step.

X_BEFORE_EXPLICIT_EVAL 

Modify $x$ before the implicit solve.

XDOT_END_STEP 

Modify $\dot{x}$ at the end of the step.

Definition at line 110 of file Tempus_StepperForwardEulerModifierXBase.hpp.

Member Function Documentation

template<class Scalar>
void Tempus::StepperForwardEulerModifierXBase< Scalar >::execute ( Teuchos::RCP< SolutionHistory< Scalar > >  sh,
Teuchos::RCP< StepperForwardEuler< Scalar > >  stepper,
const typename StepperForwardEulerAppAction< Scalar >::ACTION_LOCATION  actLoc 
)
inlineprivatevirtual

Execute application action for ForwardEuler Stepper.

Implements Tempus::StepperForwardEulerAppAction< Scalar >.

Definition at line 67 of file Tempus_StepperForwardEulerModifierXBase.hpp.

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

Modify solution based on the MODIFIER_TYPE.


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