Tempus  Version of the Day
Time Integration
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Tempus_StepperRKObserverBase.hpp
Go to the documentation of this file.
1 // @HEADER
2 // ****************************************************************************
3 // Tempus: Copyright (2017) Sandia Corporation
4 //
5 // Distributed under BSD 3-clause license (See accompanying file Copyright.txt)
6 // ****************************************************************************
7 // @HEADER
8 
9 #ifndef Tempus_StepperRKObserverBase_hpp
10 #define Tempus_StepperRKObserverBase_hpp
11 
12 #include "Tempus_config.hpp"
13 #include "Tempus_SolutionHistory.hpp"
15 
16 namespace Tempus {
17 
33 template <class Scalar>
35  : virtual public Tempus::StepperRKAppAction<Scalar> {
36  private:
37  /* \brief Adaptor execute function
38  *
39  * This is an adaptor function to bridge between the AppAction
40  * interface and this derived interface. It is meant to be private
41  * and non-virtual as deriving from this class should only need to
42  * implement the observe function.
43  *
44  * For the Observer interface, this adaptor simply "applies" constantness
45  * to the arguments.
46  */
47  void execute(
50  const typename StepperRKAppAction<Scalar>::ACTION_LOCATION actLoc)
51  {
52  this->observe(sh, stepper, actLoc);
53  }
54 
55  public:
57  virtual void observe(
58  Teuchos::RCP<const SolutionHistory<Scalar> > /* sh */,
59  Teuchos::RCP<const StepperRKBase<Scalar> > /* stepper */,
60  const typename StepperRKAppAction<Scalar>::ACTION_LOCATION actLoc) = 0;
61 };
62 
63 } // namespace Tempus
64 
65 #endif // Tempus_StepperRKObserverBase_hpp
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.
Base class for Runge-Kutta methods, ExplicitRK, DIRK and IMEX.
Application Action for StepperRKBase.
SolutionHistory is basically a container of SolutionStates. SolutionHistory maintains a collection of...
ACTION_LOCATION
Indicates the location of application action (see algorithm).
virtual void observe(Teuchos::RCP< const SolutionHistory< Scalar > >, Teuchos::RCP< const StepperRKBase< Scalar > >, const typename StepperRKAppAction< Scalar >::ACTION_LOCATION actLoc)=0
Observe RK Stepper.