Tempus  Version of the Day
Time Integration
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Tempus_StepperBackwardEulerObserverBase.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_StepperBackwardEulerObserverBase_hpp
10 #define Tempus_StepperBackwardEulerObserverBase_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::StepperBackwardEulerAppAction<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(
51  actLoc)
52  {
53  this->observe(sh, stepper, actLoc);
54  }
55 
56  public:
58  virtual void observe(
59  Teuchos::RCP<const SolutionHistory<Scalar> > /* sh */,
60  Teuchos::RCP<const StepperBackwardEuler<Scalar> > /* stepper */,
62  actLoc) = 0;
63 };
64 
65 } // namespace Tempus
66 
67 #endif // Tempus_StepperBackwardEulerObserverBase_hpp
void execute(Teuchos::RCP< SolutionHistory< Scalar > > sh, Teuchos::RCP< StepperBackwardEuler< Scalar > > stepper, const typename StepperBackwardEulerAppAction< Scalar >::ACTION_LOCATION actLoc)
Execute application action for BackwardEuler Stepper.
ACTION_LOCATION
Indicates the location of application action (see algorithm).
virtual void observe(Teuchos::RCP< const SolutionHistory< Scalar > >, Teuchos::RCP< const StepperBackwardEuler< Scalar > >, const typename StepperBackwardEulerAppAction< Scalar >::ACTION_LOCATION actLoc)=0
Observe BackwardEuler Stepper.
Application Action for StepperBackwardEuler.
SolutionHistory is basically a container of SolutionStates. SolutionHistory maintains a collection of...