Tempus  Version of the Day
Time Integration
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Tempus_StepperForwardEulerObserver.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_StepperForwardEulerObserver_hpp
10 #define Tempus_StepperForwardEulerObserver_hpp
11 
13 #include "Tempus_SolutionHistory.hpp"
14 
15 
16 namespace Tempus {
17 
18 // Forward Declaration for recursive includes (this Observer <--> Stepper)
19 template<class Scalar> class StepperForwardEuler;
20 
21 /** \brief StepperForwardEulerObserver class for StepperForwardEuler.
22  *
23  * This is a means for application developers to perform tasks
24  * during the time steps, e.g.,
25  * - Compute specific quantities
26  * - Output information
27  * - "Massage" the working solution state
28  * - ...
29  *
30  * <b>Design Considerations</b>
31  * - StepperForwardEulerObserver is not stateless! Developers may touch the
32  * solution state! Developers need to be careful not to break the
33  * restart (checkpoint) capability.
34  */
35 template<class Scalar>
37  : virtual public Tempus::StepperObserver<Scalar>
38 {
39 public:
40 
41  /// Constructor
43 
44  /// Destructor
46 
47  /// Observe Stepper at beginning of takeStep.
48  virtual void observeBeginTakeStep(
49  Teuchos::RCP<SolutionHistory<Scalar> > /* sh */,
50  Stepper<Scalar> & /* stepper */){}
51 
52  /// Observe Stepper before Explicit ME evaluation.
53  virtual void observeBeforeExplicit(
54  Teuchos::RCP<SolutionHistory<Scalar> > /* sh */,
55  StepperForwardEuler<Scalar> & /* stepperFE */){}
56 
57  /// Observe Stepper at end of takeStep.
58  virtual void observeEndTakeStep(
59  Teuchos::RCP<SolutionHistory<Scalar> > /* sh */,
60  Stepper<Scalar> & /* stepper */){}
61 };
62 } // namespace Tempus
63 #endif // Tempus_StepperForwardEulerObserver_hpp
virtual void observeBeforeExplicit(Teuchos::RCP< SolutionHistory< Scalar > >, StepperForwardEuler< Scalar > &)
Observe Stepper before Explicit ME evaluation.
virtual void observeEndTakeStep(Teuchos::RCP< SolutionHistory< Scalar > >, Stepper< Scalar > &)
Observe Stepper at end of takeStep.
StepperForwardEulerObserver class for StepperForwardEuler.
Thyra Base interface for time steppers.
StepperObserver class for Stepper class.
virtual void observeBeginTakeStep(Teuchos::RCP< SolutionHistory< Scalar > >, Stepper< Scalar > &)
Observe Stepper at beginning of takeStep.
SolutionHistory is basically a container of SolutionStates. SolutionHistory maintains a collection of...