Tempus Version of the Day
Time Integration
Loading...
Searching...
No Matches
Tempus_IntegratorObserverComposite_decl.hpp
Go to the documentation of this file.
1//@HEADER
2// *****************************************************************************
3// Tempus: Time Integration and Sensitivity Analysis Package
4//
5// Copyright 2017 NTESS and the Tempus contributors.
6// SPDX-License-Identifier: BSD-3-Clause
7// *****************************************************************************
8//@HEADER
9
10#ifndef Tempus_IntegratorObserverComposite_decl_hpp
11#define Tempus_IntegratorObserverComposite_decl_hpp
12
13#include "Tempus_config.hpp"
15#include "Tempus_TimeStepControl.hpp"
16#include <vector>
17
18namespace Tempus {
19
25template <class Scalar>
27 : virtual public Tempus::IntegratorObserver<Scalar> {
28 public:
31
34
36
37
38 virtual void observeStartIntegrator(
39 const Integrator<Scalar>& integrator) override;
40
42 virtual void observeStartTimeStep(
43 const Integrator<Scalar>& integrator) override;
44
46 virtual void observeNextTimeStep(
47 const Integrator<Scalar>& integrator) override;
48
50 virtual void observeBeforeTakeStep(
51 const Integrator<Scalar>& integrator) override;
52
54 virtual void observeAfterTakeStep(
55 const Integrator<Scalar>& integrator) override;
56
58 virtual void observeAfterCheckTimeStep(
59 const Integrator<Scalar>& integrator) override;
60
62 virtual void observeEndTimeStep(
63 const Integrator<Scalar>& integrator) override;
64
66 virtual void observeEndIntegrator(
67 const Integrator<Scalar>& integrator) override;
68
69 // add observer to the composite observer list
70 void addObserver(const Teuchos::RCP<IntegratorObserver<Scalar> >& observer);
71
72 // clear all observer from the composite observer list
73 void clearObservers();
75
76 private:
77 std::vector<Teuchos::RCP<IntegratorObserver<Scalar> > > observers_;
78};
79
80} // namespace Tempus
81#endif // Tempus_IntegratorObserverComposite_decl_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.
std::vector< Teuchos::RCP< IntegratorObserver< Scalar > > > observers_
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...