Tempus  Version of the Day
Time Integration
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Tempus_IntegratorObserverComposite_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_IntegratorObserverComposite_decl_hpp
10 #define Tempus_IntegratorObserverComposite_decl_hpp
11 
12 #include "Tempus_config.hpp"
14 #include "Tempus_TimeStepControl.hpp"
15 #include <vector>
16 
17 namespace Tempus {
18 
24 template <class Scalar>
26  : virtual public Tempus::IntegratorObserver<Scalar> {
27  public:
30 
33 
35 
36  virtual void observeStartIntegrator(
38  const Integrator<Scalar>& integrator) override;
39 
41  virtual void observeStartTimeStep(
42  const Integrator<Scalar>& integrator) override;
43 
45  virtual void observeNextTimeStep(
46  const Integrator<Scalar>& integrator) override;
47 
49  virtual void observeBeforeTakeStep(
50  const Integrator<Scalar>& integrator) override;
51 
53  virtual void observeAfterTakeStep(
54  const Integrator<Scalar>& integrator) override;
55 
57  virtual void observeAfterCheckTimeStep(
58  const Integrator<Scalar>& integrator) override;
59 
61  virtual void observeEndTimeStep(
62  const Integrator<Scalar>& integrator) override;
63 
65  virtual void observeEndIntegrator(
66  const Integrator<Scalar>& integrator) override;
67 
68  // add observer to the composite observer list
69  void addObserver(const Teuchos::RCP<IntegratorObserver<Scalar> >& observer);
70 
71  // clear all observer from the composite observer list
72  void clearObservers();
74 
75  private:
76  std::vector<Teuchos::RCP<IntegratorObserver<Scalar> > > observers_;
77 };
78 
79 } // namespace Tempus
80 #endif // Tempus_IntegratorObserverComposite_decl_hpp
virtual void observeBeforeTakeStep(const Integrator< Scalar > &integrator) override
Observe before Stepper takes step.
virtual void observeEndIntegrator(const Integrator< Scalar > &integrator) override
Observe the end of the time integrator.
void addObserver(const Teuchos::RCP< IntegratorObserver< Scalar > > &observer)
virtual void observeEndTimeStep(const Integrator< Scalar > &integrator) override
Observe the end of the time step loop.
IntegratorObserver class for time integrators.
std::vector< Teuchos::RCP< IntegratorObserver< Scalar > > > observers_
Thyra Base interface for time integrators. Time integrators are designed to advance the solution from...
virtual void observeStartIntegrator(const Integrator< Scalar > &integrator) override
Observe the beginning of the time integrator.
virtual void observeAfterCheckTimeStep(const Integrator< Scalar > &integrator) override
Observe after checking time step.
virtual void observeAfterTakeStep(const Integrator< Scalar > &integrator) override
Observe after Stepper takes step.
virtual void observeStartTimeStep(const Integrator< Scalar > &integrator) override
Observe the beginning of the time step loop.
virtual void observeNextTimeStep(const Integrator< Scalar > &integrator) override
Observe after the next time step size is selected.