Tempus  Version of the Day
Time Integration
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Tempus_StepperRKObserver.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_StepperRKObserver_hpp
10 #define Tempus_StepperRKObserver_hpp
11 
12 #include "Tempus_SolutionHistory.hpp"
14 
15 
16 namespace Tempus {
17 
18 // Forward Declaration for recursive includes (this Observer <--> Stepper)
19 //template<class Scalar> class Stepper;
20 
21 /** \brief StepperRKObserver class for StepperRK.
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  * - StepperRKObserver 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
45  virtual ~StepperRKObserver(){}
46 
47  /// 1.) Observe Stepper at beginning of takeStep.
48  virtual void observeBeginTakeStep(
49  Teuchos::RCP<SolutionHistory<Scalar> > /* sh */,
50  Stepper<Scalar> & /* stepper */){}
51 
52  /// 2.) Observe Stepper at beginning of each stage.
53  virtual void observeBeginStage(
54  Teuchos::RCP<SolutionHistory<Scalar> > /* sh */,
55  Stepper<Scalar> & /* stepper */){}
56 
57  /// 3.) Observe Stepper before Explicit evaluation of Implicit ODE ME (IMEX).
59  Teuchos::RCP<SolutionHistory<Scalar> > /* sh */,
60  Stepper<Scalar> & /* stepper */){}
61 
62  /// 4.) Observe Stepper before nonlinear solve (DIRK/IMEX).
63  virtual void observeBeforeSolve(
64  Teuchos::RCP<SolutionHistory<Scalar> > /* sh */,
65  Stepper<Scalar> & /* stepper */){}
66 
67  /// 5.) Observe Stepper after nonlinear solve (DIRK/IMEX).
68  virtual void observeAfterSolve(
69  Teuchos::RCP<SolutionHistory<Scalar> > /* sh */,
70  Stepper<Scalar> & /* stepper */){}
71 
72  /// 6.) Observe Stepper before Explicit evaluation of Implicit ODE ME (IMEX).
73  virtual void observeBeforeExplicit(
74  Teuchos::RCP<SolutionHistory<Scalar> > /* sh */,
75  Stepper<Scalar> & /* stepper */){}
76 
77  /// 7.) Observe Stepper at end of each stage.
78  virtual void observeEndStage(
79  Teuchos::RCP<SolutionHistory<Scalar> > /* sh */,
80  Stepper<Scalar> & /* stepper */){}
81 
82  /// 8.) Observe Stepper at end of takeStep.
83  virtual void observeEndTakeStep(
84  Teuchos::RCP<SolutionHistory<Scalar> > /* sh */,
85  Stepper<Scalar> & /* stepper */){}
86 };
87 } // namespace Tempus
88 #endif // Tempus_StepperRKObserver_hpp
virtual ~StepperRKObserver()
Destructor.
virtual void observeBeforeSolve(Teuchos::RCP< SolutionHistory< Scalar > >, Stepper< Scalar > &)
4.) Observe Stepper before nonlinear solve (DIRK/IMEX).
virtual void observeEndTakeStep(Teuchos::RCP< SolutionHistory< Scalar > >, Stepper< Scalar > &)
8.) Observe Stepper at end of takeStep.
virtual void observeAfterSolve(Teuchos::RCP< SolutionHistory< Scalar > >, Stepper< Scalar > &)
5.) Observe Stepper after nonlinear solve (DIRK/IMEX).
Thyra Base interface for time steppers.
virtual void observeEndStage(Teuchos::RCP< SolutionHistory< Scalar > >, Stepper< Scalar > &)
7.) Observe Stepper at end of each stage.
StepperObserver class for Stepper class.
SolutionHistory is basically a container of SolutionStates. SolutionHistory maintains a collection of...
virtual void observeBeginStage(Teuchos::RCP< SolutionHistory< Scalar > >, Stepper< Scalar > &)
2.) Observe Stepper at beginning of each stage.
StepperRKObserver class for StepperRK.
virtual void observeBeforeImplicitExplicitly(Teuchos::RCP< SolutionHistory< Scalar > >, Stepper< Scalar > &)
3.) Observe Stepper before Explicit evaluation of Implicit ODE ME (IMEX).
virtual void observeBeforeExplicit(Teuchos::RCP< SolutionHistory< Scalar > >, Stepper< Scalar > &)
6.) Observe Stepper before Explicit evaluation of Implicit ODE ME (IMEX).
virtual void observeBeginTakeStep(Teuchos::RCP< SolutionHistory< Scalar > >, Stepper< Scalar > &)
1.) Observe Stepper at beginning of takeStep.