Tempus
Version of the Day
Time Integration
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Pages
Tempus_StepperObserverComposite_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_StepperObserverComposite_decl_hpp
10
#define Tempus_StepperObserverComposite_decl_hpp
11
12
#include "
Tempus_StepperObserver.hpp
"
13
#include "Tempus_TimeStepControl.hpp"
14
#include <vector>
15
16
namespace
Tempus {
17
18
/** \brief This observer is a composite observer,
19
*
20
* which takes other StepperObservers and sequentially calls each
21
* individual observer function.
22
*/
23
template
<
class
Scalar>
24
class
StepperObserverComposite
25
:
virtual
public
Tempus::StepperObserver
<Scalar>
26
{
27
public
:
28
29
/// Default constructor
30
StepperObserverComposite
();
31
32
/// Destructor
33
virtual
~StepperObserverComposite
();
34
35
/// \name Override StepperObserver basic methods
36
//@{
37
/// Observe the beginning of the time integrator.
38
virtual
void
observeBeginTakeStep
(Teuchos::RCP<
SolutionHistory<Scalar>
> sh,
Stepper<Scalar>
& stepper)
override
;
39
40
/// Observe the beginning of the time step loop.
41
virtual
void
observeEndTakeStep
(Teuchos::RCP<
SolutionHistory<Scalar>
> sh,
Stepper<Scalar>
& stepper)
override
;
42
43
// add observer to the composite observer list
44
void
addObserver
(
const
Teuchos::RCP<
StepperObserver<Scalar>
> &observer);
45
46
// clear all observer from the composite observer list
47
void
clearObservers
();
48
49
// get the number of RK stepper observers present in the composite
50
std::size_t
getSize
()
const
{
return
observers_
.size(); }
51
//@}
52
53
private
:
54
55
std::vector<Teuchos::RCP<StepperObserver<Scalar > > >
observers_
;
56
57
};
58
59
}
// namespace Tempus
60
#endif // Tempus_StepperObserverComposite_decl_hpp
Tempus::StepperObserverComposite::getSize
std::size_t getSize() const
Definition:
Tempus_StepperObserverComposite_decl.hpp:50
Tempus::StepperObserverComposite::addObserver
void addObserver(const Teuchos::RCP< StepperObserver< Scalar > > &observer)
Definition:
Tempus_StepperObserverComposite_impl.hpp:43
Tempus::Stepper
Thyra Base interface for time steppers.
Definition:
Tempus_Integrator.hpp:24
Tempus::StepperObserverComposite
This observer is a composite observer,.
Definition:
Tempus_StepperObserverComposite_decl.hpp:24
Tempus::StepperObserverComposite::observeBeginTakeStep
virtual void observeBeginTakeStep(Teuchos::RCP< SolutionHistory< Scalar > > sh, Stepper< Scalar > &stepper) override
Observe the beginning of the time integrator.
Definition:
Tempus_StepperObserverComposite_impl.hpp:25
Tempus_StepperObserver.hpp
Tempus::StepperObserverComposite::clearObservers
void clearObservers()
Definition:
Tempus_StepperObserverComposite_impl.hpp:50
Tempus::StepperObserver
StepperObserver class for Stepper class.
Definition:
Tempus_StepperObserver.hpp:38
Tempus::SolutionHistory
SolutionHistory is basically a container of SolutionStates. SolutionHistory maintains a collection of...
Definition:
Tempus_Integrator.hpp:25
Tempus::StepperObserverComposite::observeEndTakeStep
virtual void observeEndTakeStep(Teuchos::RCP< SolutionHistory< Scalar > > sh, Stepper< Scalar > &stepper) override
Observe the beginning of the time step loop.
Definition:
Tempus_StepperObserverComposite_impl.hpp:34
Tempus::StepperObserverComposite::StepperObserverComposite
StepperObserverComposite()
Default constructor.
Definition:
Tempus_StepperObserverComposite_impl.hpp:18
Tempus::StepperObserverComposite::observers_
std::vector< Teuchos::RCP< StepperObserver< Scalar > > > observers_
Definition:
Tempus_StepperObserverComposite_decl.hpp:55
Tempus::StepperObserverComposite::~StepperObserverComposite
virtual ~StepperObserverComposite()
Destructor.
Definition:
Tempus_StepperObserverComposite_impl.hpp:21
src
Tempus_StepperObserverComposite_decl.hpp
Generated on Tue Nov 12 2024 09:36:31 for Tempus by
1.8.5