Tempus  Version of the Day
Time Integration
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Tempus_StepperRKObserverComposite_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_StepperRKObserverComposite_impl_hpp
10 #define Tempus_StepperRKObserverComposite_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  Stepper<Scalar> & stepper)
27 {
28  for(auto& o : observers_)
29  o->observeBeginTakeStep(sh,stepper);
30 }
31 
32 template<class Scalar>
34  Teuchos::RCP<SolutionHistory<Scalar> > sh,
35  Stepper<Scalar> & stepper)
36 {
37  for(auto& o : observers_)
38  o->observeBeginStage(sh,stepper);
39 }
40 
41 template<class Scalar>
43  Teuchos::RCP<SolutionHistory<Scalar> > sh,
44  Stepper<Scalar> & stepper)
45 {
46  for(auto& o : observers_)
47  o->observeBeforeImplicitExplicitly(sh,stepper);
48 }
49 
50 template<class Scalar>
52  Teuchos::RCP<SolutionHistory<Scalar> > sh,
53  Stepper<Scalar> & stepper)
54 {
55  for(auto& o : observers_)
56  o->observeBeforeSolve(sh,stepper);
57 }
58 
59 template<class Scalar>
61  Teuchos::RCP<SolutionHistory<Scalar> > sh,
62  Stepper<Scalar> & stepper)
63 {
64  for(auto& o : observers_)
65  o->observeAfterSolve(sh,stepper);
66 }
67 
68 template<class Scalar>
70  Teuchos::RCP<SolutionHistory<Scalar> > sh,
71  Stepper<Scalar> & stepper)
72 {
73  for(auto& o : observers_)
74  o->observeBeforeExplicit(sh,stepper);
75 }
76 template<class Scalar>
78  Teuchos::RCP<SolutionHistory<Scalar> > sh,
79  Stepper<Scalar> & stepper)
80 {
81  for(auto& o : observers_)
82  o->observeEndStage(sh,stepper);
83 }
84 
85 template<class Scalar>
88  Stepper<Scalar> & stepper)
89 {
90  for(auto& o : observers_)
91  o->observeEndTakeStep(sh,stepper);
92 }
93 
94 template<class Scalar>
96 addObserver(const Teuchos::RCP<StepperRKObserver<Scalar> > &observer)
97 {
98  observers_.push_back(observer);
99 }
100 
101 template<class Scalar>
103 clearObservers() { observers_.clear();}
104 
105 } // namespace Tempus
106 #endif // Tempus_StepperRKObserverComposite_impl_hpp
virtual void observeBeginTakeStep(Teuchos::RCP< SolutionHistory< Scalar > > sh, Stepper< Scalar > &stepper) override
Observe Stepper at beginning of takeStep.
virtual void observeEndTakeStep(Teuchos::RCP< SolutionHistory< Scalar > > sh, Stepper< Scalar > &stepper) override
Observe Stepper at end of takeStep.
virtual void observeBeforeSolve(Teuchos::RCP< SolutionHistory< Scalar > > sh, Stepper< Scalar > &stepperRK) override
Observe Stepper before nonlinear solve.
Thyra Base interface for time steppers.
void addObserver(const Teuchos::RCP< StepperRKObserver< Scalar > > &observer)
virtual void observeBeforeExplicit(Teuchos::RCP< SolutionHistory< Scalar > > sh, Stepper< Scalar > &stepperRK) override
Observe Stepper before evaluation of Implicit ODE ME.
SolutionHistory is basically a container of SolutionStates. SolutionHistory maintains a collection of...
virtual void observeAfterSolve(Teuchos::RCP< SolutionHistory< Scalar > > sh, Stepper< Scalar > &stepperRK) override
Observe Stepper after nonlinear solve.
virtual void observeEndStage(Teuchos::RCP< SolutionHistory< Scalar > > sh, Stepper< Scalar > &stepperRK) override
Observe Stepper at end of each stage.
virtual void observeBeforeImplicitExplicitly(Teuchos::RCP< SolutionHistory< Scalar > >, Stepper< Scalar > &) override
Observe Stepper before Explicit evaluation of Implicit ODE ME.
StepperRKObserver class for StepperRK.
virtual void observeBeginStage(Teuchos::RCP< SolutionHistory< Scalar > > sh, Stepper< Scalar > &stepperRK) override
Observe Stepper at beginning of each stage.