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_TimeStepControlStrategyComposite.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_TimeStepControlStrategyComposite_hpp
10
#define Tempus_TimeStepControlStrategyComposite_hpp
11
12
#include "
Tempus_TimeStepControlStrategy.hpp
"
13
#include "Tempus_SolutionHistory.hpp"
14
15
16
namespace
Tempus {
17
18
template
<
class
Scalar>
class
TimeStepControl;
19
20
/** \brief StepControlStrategy class for TimeStepControl
21
*
22
*/
23
template
<
class
Scalar>
24
class
TimeStepControlStrategyComposite
:
virtual
public
TimeStepControlStrategy
<Scalar>
25
{
26
public
:
27
28
/// Constructor
29
TimeStepControlStrategyComposite
(){}
30
31
/// Destructor
32
virtual
~TimeStepControlStrategyComposite
(){}
33
34
/** \brief Determine the time step size.*/
35
virtual
void
getNextTimeStep
(
const
TimeStepControl<Scalar>
tsc, Teuchos::RCP<
SolutionHistory<Scalar>
> sh ,
36
Status
& integratorStatus)
override
{
37
for
(
auto
& s :
strategies_
)
38
s->getNextTimeStep(tsc, sh, integratorStatus);
39
}
40
41
// add strategy to the composite strategy list
42
void
addStrategy
(
const
Teuchos::RCP<
TimeStepControlStrategy<Scalar>
> &strategy){
43
if
(Teuchos::nonnull(strategy))
44
strategies_
.push_back(strategy);
45
}
46
47
void
clearObservers
(){
48
strategies_
.clear();
49
}
50
51
private
:
52
std::vector<Teuchos::RCP<TimeStepControlStrategy<Scalar > > >
strategies_
;
53
54
};
55
}
// namespace Tempus
56
#endif // Tempus_TimeStepControlStrategy_hpp
Tempus::TimeStepControlStrategyComposite::strategies_
std::vector< Teuchos::RCP< TimeStepControlStrategy< Scalar > > > strategies_
Definition:
Tempus_TimeStepControlStrategyComposite.hpp:52
Tempus::TimeStepControlStrategyComposite::getNextTimeStep
virtual void getNextTimeStep(const TimeStepControl< Scalar > tsc, Teuchos::RCP< SolutionHistory< Scalar > > sh, Status &integratorStatus) override
Determine the time step size.
Definition:
Tempus_TimeStepControlStrategyComposite.hpp:35
Tempus_TimeStepControlStrategy.hpp
Tempus::Status
Status
Status for the Integrator, the Stepper and the SolutionState.
Definition:
Tempus_Types.hpp:16
Tempus::TimeStepControl
TimeStepControl manages the time step size. There several mechanicisms that effect the time step size...
Definition:
Tempus_Integrator.hpp:26
Tempus::SolutionHistory
SolutionHistory is basically a container of SolutionStates. SolutionHistory maintains a collection of...
Definition:
Tempus_Integrator.hpp:25
Tempus::TimeStepControlStrategyComposite::~TimeStepControlStrategyComposite
virtual ~TimeStepControlStrategyComposite()
Destructor.
Definition:
Tempus_TimeStepControlStrategyComposite.hpp:32
Tempus::TimeStepControlStrategyComposite
StepControlStrategy class for TimeStepControl.
Definition:
Tempus_TimeStepControlStrategyComposite.hpp:24
Tempus::TimeStepControlStrategyComposite::addStrategy
void addStrategy(const Teuchos::RCP< TimeStepControlStrategy< Scalar > > &strategy)
Definition:
Tempus_TimeStepControlStrategyComposite.hpp:42
Tempus::TimeStepControlStrategyComposite::clearObservers
void clearObservers()
Definition:
Tempus_TimeStepControlStrategyComposite.hpp:47
Tempus::TimeStepControlStrategyComposite::TimeStepControlStrategyComposite
TimeStepControlStrategyComposite()
Constructor.
Definition:
Tempus_TimeStepControlStrategyComposite.hpp:29
Tempus::TimeStepControlStrategy
StepControlStrategy class for TimeStepControl.
Definition:
Tempus_TimeStepControlStrategy.hpp:26
src
Tempus_TimeStepControlStrategyComposite.hpp
Generated on Tue Nov 26 2024 09:38:41 for Tempus by
1.8.5