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