Tempus Version of the Day
Time Integration
Loading...
Searching...
No Matches
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
15namespace Tempus {
16
17template<class Scalar>
19
20template<class Scalar>
22
23template<class Scalar>
26{
27 for(auto& o : observers_)
28 o->observeStartIntegrator(integrator);
29}
30
31template<class Scalar>
34{
35 for(auto& o : observers_)
36 o->observeStartTimeStep(integrator);
37}
38
39template<class Scalar>
42{
43 for(auto& o : observers_)
44 o->observeNextTimeStep(integrator);
45}
46
47template<class Scalar>
50{
51 for(auto& o : observers_)
52 o->observeBeforeTakeStep(integrator);
53}
54
55template<class Scalar>
58{
59 for(auto& o : observers_)
60 o->observeAfterTakeStep(integrator);
61}
62
63template<class Scalar>
66{
67 for(auto& o : observers_)
68 o->observeAfterCheckTimeStep(integrator);
69}
70
71template<class Scalar>
74{
75 for(auto& o : observers_)
76 o->observeEndTimeStep(integrator);
77}
78
79template<class Scalar>
82{
83 for(auto& o : observers_)
84 o->observeEndIntegrator(integrator);
85}
86
87template<class Scalar>
89addObserver(const Teuchos::RCP<IntegratorObserver<Scalar> > &observer)
90{
91 observers_.push_back(observer);
92}
93
94template<class Scalar>
96clearObservers() { observers_.clear();}
97
98} // namespace Tempus
99#endif // Tempus_IntegratorObserverComposite_impl_hpp
virtual void observeEndIntegrator(const Integrator< Scalar > &integrator) override
Observe the end of the time integrator.
virtual void observeStartIntegrator(const Integrator< Scalar > &integrator) override
Observe the beginning of the time integrator.
virtual void observeAfterTakeStep(const Integrator< Scalar > &integrator) override
Observe after Stepper takes step.
virtual void observeEndTimeStep(const Integrator< Scalar > &integrator) override
Observe the end of the time step loop.
virtual void observeNextTimeStep(const Integrator< Scalar > &integrator) override
Observe after the next time step size is selected.
virtual void observeBeforeTakeStep(const Integrator< Scalar > &integrator) override
Observe before Stepper takes step.
virtual void observeStartTimeStep(const Integrator< Scalar > &integrator) override
Observe the beginning of the time step loop.
void addObserver(const Teuchos::RCP< IntegratorObserver< Scalar > > &observer)
virtual void observeAfterCheckTimeStep(const Integrator< Scalar > &integrator) override
Observe after checking time step.
IntegratorObserver class for time integrators.
Thyra Base interface for time integrators. Time integrators are designed to advance the solution from...