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

Base observer for StepperRK. More...

#include <Tempus_StepperRKObserverBase.hpp>

Inheritance diagram for Tempus::StepperRKObserverBase< Scalar >:
Tempus::StepperRKAppAction< Scalar > Tempus::StepperRKObserverDefault< Scalar >

Public Member Functions

virtual void observe (Teuchos::RCP< const SolutionHistory< Scalar > >, Teuchos::RCP< const StepperRKBase< Scalar > >, const typename StepperRKAppAction< Scalar >::ACTION_LOCATION actLoc)=0
 Observe RK Stepper. 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...
 

Additional Inherited Members

- 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...
 

Detailed Description

template<class Scalar>
class Tempus::StepperRKObserverBase< Scalar >

Base observer for StepperRK.

This class provides a means to observe values (e.g., solution variables through SolutionHistory, and stepper member data through the Stepper), and cannot modify them.

Users deriving from this class can observer a lot of data, and it is expected that users will NOT modify any of that data. If the user wishes to modify the solution and/or stepper data during the Stepper::takeStep, they should use the Modifier class (with care!).

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

\begin{algorithm} \renewcommand{\thealgorithm}{} \caption{DIRK Backward Euler with observe calls indicated.} \begin{algorithmic}[1] \State \quad {\it observer.observe(solutionHistory, stepper, BEGIN\_STEP)} \State Compute the predictor (e.g., apply stepper to $x_n$). \State \quad {\it observer.observe(solutionHistory, stepper, 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 observer.observe(solutionHistory, stepper, AFTER\_SOLVE)} \State $\dot{x}_n \leftarrow (x_n-x_{n-1})/\Delta t_n$ \State \quad {\it observer.observe(solutionHistory, stepper, END\_STEP)} \end{algorithmic} \end{algorithm}

Definition at line 48 of file Tempus_StepperRKObserverBase.hpp.

Member Function Documentation

template<class Scalar>
void Tempus::StepperRKObserverBase< 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 63 of file Tempus_StepperRKObserverBase.hpp.

template<class Scalar>
virtual void Tempus::StepperRKObserverBase< Scalar >::observe ( Teuchos::RCP< const SolutionHistory< Scalar > >  ,
Teuchos::RCP< const StepperRKBase< Scalar > >  ,
const typename StepperRKAppAction< Scalar >::ACTION_LOCATION  actLoc 
)
pure virtual

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