Tempus  Version of the Day
Time Integration
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Tempus_IntegratorObserverLogging_decl.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_IntegratorObserverLogging_decl_hpp
10 #define Tempus_IntegratorObserverLogging_decl_hpp
11 
12 #include "Tempus_config.hpp"
14 #include <list>
15 
16 namespace Tempus {
17 
23 template <class Scalar>
25  : virtual public Tempus::IntegratorObserver<Scalar> {
26  public:
29 
32 
34 
35  virtual void observeStartIntegrator(
37  const Integrator<Scalar>& integrator) override;
38 
40  virtual void observeStartTimeStep(
41  const Integrator<Scalar>& integrator) override;
42 
44  virtual void observeNextTimeStep(
45  const Integrator<Scalar>& integrator) override;
46 
48  virtual void observeBeforeTakeStep(
49  const Integrator<Scalar>& integrator) override;
50 
52  virtual void observeAfterTakeStep(
53  const Integrator<Scalar>& integrator) override;
54 
56  virtual void observeAfterCheckTimeStep(
57  const Integrator<Scalar>& integrator) override;
58 
60  virtual void observeEndTimeStep(
61  const Integrator<Scalar>& integrator) override;
62 
64  virtual void observeEndIntegrator(
65  const Integrator<Scalar>& integrator) override;
67 
68  void resetLogCounters();
69 
71 
73 
78  const std::string nameObserveStartIntegrator_;
79  const std::string nameObserveStartTimeStep_;
80  const std::string nameObserveNextTimeStep_;
81  const std::string nameObserveBeforeTakeStep_;
82  const std::string nameObserveAfterTakeStep_;
83  const std::string nameObserveAfterCheckTimeStep_;
84  const std::string nameObserveEndTimeStep_;
85  const std::string nameObserveEndIntegrator_;
87 
88  private:
94  void logCall(const std::string call) const;
95 
98 };
99 
100 } // namespace Tempus
101 #endif // Tempus_IntegratorObserverLogging_decl_hpp
Teuchos::RCP< const std::list< std::string > > getOrder()
virtual void observeNextTimeStep(const Integrator< Scalar > &integrator) override
Observe after the next time step size is selected.
Teuchos::RCP< std::list< std::string > > order_
virtual void observeBeforeTakeStep(const Integrator< Scalar > &integrator) override
Observe before Stepper takes step.
Teuchos::RCP< std::map< std::string, int > > counters_
void logCall(const std::string call) const
Asserts next call on the stack is correct and removes from stack.
virtual void observeAfterCheckTimeStep(const Integrator< Scalar > &integrator) override
Observe after checking time step.
virtual void observeEndTimeStep(const Integrator< Scalar > &integrator) override
Observe the end of the time step loop.
This observer logs calls to observer functions. This observer simply logs and counts the calls to eac...
IntegratorObserver class for time integrators.
Thyra Base interface for time integrators. Time integrators are designed to advance the solution from...
virtual void observeAfterTakeStep(const Integrator< Scalar > &integrator) override
Observe after Stepper takes step.
virtual void observeEndIntegrator(const Integrator< Scalar > &integrator) override
Observe the end of the time integrator.
Teuchos::RCP< const std::map< std::string, int > > getCounters()
virtual void observeStartIntegrator(const Integrator< Scalar > &integrator) override
Observe the beginning of the time integrator.
virtual void observeStartTimeStep(const Integrator< Scalar > &integrator) override
Observe the beginning of the time step loop.