Tempus  Version of the Day
Time Integration
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Tempus_IntegratorObserverComposite_impl.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_impl_hpp
10 #define Tempus_IntegratorObserverComposite_impl_hpp
11 
13 #include "Tempus_TimeStepControl.hpp"
14 
15 namespace Tempus {
16 
17 template<class Scalar>
19 
20 template<class Scalar>
22 
23 template<class Scalar>
26 {
27  for(auto& o : observers_)
28  o->observeStartIntegrator(integrator);
29 }
30 
31 template<class Scalar>
34 {
35  for(auto& o : observers_)
36  o->observeStartTimeStep(integrator);
37 }
38 
39 template<class Scalar>
42 {
43  for(auto& o : observers_)
44  o->observeNextTimeStep(integrator);
45 }
46 
47 template<class Scalar>
50 {
51  for(auto& o : observers_)
52  o->observeBeforeTakeStep(integrator);
53 }
54 
55 template<class Scalar>
58 {
59  for(auto& o : observers_)
60  o->observeAfterTakeStep(integrator);
61 }
62 
63 template<class Scalar>
66 {
67  for(auto& o : observers_)
68  o->observeAfterCheckTimeStep(integrator);
69 }
70 
71 template<class Scalar>
74 {
75  for(auto& o : observers_)
76  o->observeEndTimeStep(integrator);
77 }
78 
79 template<class Scalar>
82 {
83  for(auto& o : observers_)
84  o->observeEndIntegrator(integrator);
85 }
86 
87 template<class Scalar>
89 addObserver(const Teuchos::RCP<IntegratorObserver<Scalar> > &observer)
90 {
91  observers_.push_back(observer);
92 }
93 
94 template<class Scalar>
96 clearObservers() { observers_.clear();}
97 
98 } // namespace Tempus
99 #endif // Tempus_IntegratorObserverComposite_impl_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.
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.