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_StepperRKAppActionComposite.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_StepperRKAppActionComposite_hpp
10
#define Tempus_StepperRKAppActionComposite_hpp
11
12
#include "
Tempus_StepperRKAppAction.hpp
"
13
#include <vector>
14
15
namespace
Tempus {
16
17
/** \brief This composite AppAction loops over added AppActions.
18
*
19
* Individual AppActions are executed in the order in which they
20
* were added.
21
*/
22
template
<
class
Scalar>
23
class
StepperRKAppActionComposite
24
:
virtual
public
Tempus::StepperRKAppAction
<Scalar>
25
{
26
public
:
27
28
/// Default constructor
29
StepperRKAppActionComposite
() {}
30
31
/// Destructor
32
virtual
~StepperRKAppActionComposite
() {}
33
34
/// Execute application action for RK Stepper.
35
virtual
void
execute
(
36
Teuchos::RCP<
SolutionHistory<Scalar>
> sh,
37
Teuchos::RCP<
StepperRKBase<Scalar>
> stepper,
38
const
typename
StepperRKAppAction<Scalar>::ACTION_LOCATION
actLoc)
39
{
40
for
(
auto
& a :
appActions_
)
41
a->execute(sh, stepper, actLoc);
42
}
43
44
// Add AppAction to the AppAction vector.
45
void
addRKAppAction
(Teuchos::RCP<
StepperRKAppAction<Scalar>
> appAction)
46
{
47
appActions_
.push_back(appAction);
48
}
49
50
// Clear the AppAction vector.
51
void
clearRKAppActions
()
52
{
appActions_
.clear(); }
53
54
// Return the size of the AppAction vector.
55
std::size_t
getSize
()
const
{
return
appActions_
.size(); }
56
57
private
:
58
59
std::vector<Teuchos::RCP<StepperRKAppAction<Scalar > > >
appActions_
;
60
61
};
62
63
}
// namespace Tempus
64
#endif // Tempus_StepperRKAppActionComposite_hpp
Tempus::StepperRKAppActionComposite::StepperRKAppActionComposite
StepperRKAppActionComposite()
Default constructor.
Definition:
Tempus_StepperRKAppActionComposite.hpp:29
Tempus_StepperRKAppAction.hpp
Tempus::StepperRKAppActionComposite::getSize
std::size_t getSize() const
Definition:
Tempus_StepperRKAppActionComposite.hpp:55
Tempus::StepperRKAppActionComposite
This composite AppAction loops over added AppActions.
Definition:
Tempus_StepperRKAppActionComposite.hpp:23
Tempus::StepperRKBase
Base class for Runge-Kutta methods, ExplicitRK, DIRK and IMEX.
Definition:
Tempus_StepperRKAppAction.hpp:19
Tempus::StepperRKAppAction
Application Action for StepperRKBase.
Definition:
Tempus_StepperRKAppAction.hpp:35
Tempus::StepperRKAppActionComposite::execute
virtual void execute(Teuchos::RCP< SolutionHistory< Scalar > > sh, Teuchos::RCP< StepperRKBase< Scalar > > stepper, const typename StepperRKAppAction< Scalar >::ACTION_LOCATION actLoc)
Execute application action for RK Stepper.
Definition:
Tempus_StepperRKAppActionComposite.hpp:35
Tempus::StepperRKAppActionComposite::appActions_
std::vector< Teuchos::RCP< StepperRKAppAction< Scalar > > > appActions_
Definition:
Tempus_StepperRKAppActionComposite.hpp:59
Tempus::SolutionHistory
SolutionHistory is basically a container of SolutionStates. SolutionHistory maintains a collection of...
Definition:
Tempus_Integrator.hpp:25
Tempus::StepperRKAppActionComposite::~StepperRKAppActionComposite
virtual ~StepperRKAppActionComposite()
Destructor.
Definition:
Tempus_StepperRKAppActionComposite.hpp:32
Tempus::StepperRKAppAction::ACTION_LOCATION
ACTION_LOCATION
Indicates the location of application action (see algorithm).
Definition:
Tempus_StepperRKAppAction.hpp:40
Tempus::StepperRKAppActionComposite::clearRKAppActions
void clearRKAppActions()
Definition:
Tempus_StepperRKAppActionComposite.hpp:51
Tempus::StepperRKAppActionComposite::addRKAppAction
void addRKAppAction(Teuchos::RCP< StepperRKAppAction< Scalar > > appAction)
Definition:
Tempus_StepperRKAppActionComposite.hpp:45
src
Tempus_StepperRKAppActionComposite.hpp
Generated on Fri Dec 20 2024 09:38:31 for Tempus by
1.8.5