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_StepperRKModifierDefault.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_StepperRKModifierDefault_hpp
10
#define Tempus_StepperRKModifierDefault_hpp
11
12
#include "Tempus_config.hpp"
13
#include "
Tempus_StepperRKModifierBase.hpp
"
14
15
// Applications can uncomment this include in their implementation,
16
// if they need access to the stepper methods.
17
//#include "Tempus_StepperRKBase.hpp"
18
19
20
namespace
Tempus {
21
22
/** \brief Default modifier for StepperRK.
23
*
24
* The default modifier provides no-op functionality for the modifier.
25
* See StepperRKModifierBase for details on the algorithm.
26
*
27
* Applications can copy this implementation, rename, implement their
28
* action, and set on the stepper to get app-specific functionality.
29
*/
30
template
<
class
Scalar>
31
class
StepperRKModifierDefault
32
:
virtual
public
Tempus::StepperRKModifierBase
<Scalar>
33
{
34
public
:
35
36
/// Constructor
37
StepperRKModifierDefault
(){}
38
39
/// Destructor
40
virtual
~StepperRKModifierDefault
(){}
41
42
/// Modify RK Stepper.
43
virtual
void
modify
(
44
Teuchos::RCP<
SolutionHistory<Scalar>
>
/* sh */
,
45
Teuchos::RCP<
StepperRKBase<Scalar>
>
/* stepper */
,
46
const
typename
StepperRKAppAction<Scalar>::ACTION_LOCATION
actLoc)
47
{
48
switch
(actLoc) {
49
case
StepperRKAppAction<Scalar>::BEGIN_STEP
:
50
case
StepperRKAppAction<Scalar>::BEGIN_STAGE
:
51
case
StepperRKAppAction<Scalar>::BEFORE_SOLVE
:
52
case
StepperRKAppAction<Scalar>::AFTER_SOLVE
:
53
case
StepperRKAppAction<Scalar>::BEFORE_EXPLICIT_EVAL
:
54
case
StepperRKAppAction<Scalar>::END_STAGE
:
55
case
StepperRKAppAction<Scalar>::END_STEP
:
56
{
57
// No-op.
58
break
;
59
}
60
default
:
61
TEUCHOS_TEST_FOR_EXCEPTION(
true
, std::logic_error,
62
"Error - unknown action location = "
+ std::to_string(actLoc) +
"\n"
63
" Valid actions are\n"
64
" StepperRKAppAction<Scalar>::BEGIN_STEP = "
+ std::to_string(
StepperRKAppAction<Scalar>::BEGIN_STEP
) +
"\n"
65
" StepperRKAppAction<Scalar>::BEGIN_STAGE = "
+ std::to_string(
StepperRKAppAction<Scalar>::BEGIN_STAGE
) +
"\n"
66
" StepperRKAppAction<Scalar>::BEFORE_SOLVE = "
+ std::to_string(
StepperRKAppAction<Scalar>::BEFORE_SOLVE
) +
"\n"
67
" StepperRKAppAction<Scalar>::AFTER_SOLVE = "
+ std::to_string(
StepperRKAppAction<Scalar>::AFTER_SOLVE
) +
"\n"
68
" StepperRKAppAction<Scalar>::BEFORE_EXPLICIT_EVAL = "
+ std::to_string(
StepperRKAppAction<Scalar>::BEFORE_EXPLICIT_EVAL
) +
"\n"
69
" StepperRKAppAction<Scalar>::END_STAGE = "
+ std::to_string(
StepperRKAppAction<Scalar>::END_STAGE
) +
"\n"
70
" StepperRKAppAction<Scalar>::END_STEP = "
+ std::to_string(
StepperRKAppAction<Scalar>::END_STEP
) +
"\n"
71
);
72
}
73
}
74
75
};
76
77
}
// namespace Tempus
78
79
#endif // Tempus_StepperRKModifierDefault_hpp
Tempus::StepperRKModifierDefault::StepperRKModifierDefault
StepperRKModifierDefault()
Constructor.
Definition:
Tempus_StepperRKModifierDefault.hpp:37
Tempus_StepperRKModifierBase.hpp
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::StepperRKModifierDefault::~StepperRKModifierDefault
virtual ~StepperRKModifierDefault()
Destructor.
Definition:
Tempus_StepperRKModifierDefault.hpp:40
Tempus::SolutionHistory
SolutionHistory is basically a container of SolutionStates. SolutionHistory maintains a collection of...
Definition:
Tempus_Integrator.hpp:25
Tempus::StepperRKAppAction::ACTION_LOCATION
ACTION_LOCATION
Indicates the location of application action (see algorithm).
Definition:
Tempus_StepperRKAppAction.hpp:40
Tempus::StepperRKModifierDefault::modify
virtual void modify(Teuchos::RCP< SolutionHistory< Scalar > >, Teuchos::RCP< StepperRKBase< Scalar > >, const typename StepperRKAppAction< Scalar >::ACTION_LOCATION actLoc)
Modify RK Stepper.
Definition:
Tempus_StepperRKModifierDefault.hpp:43
Tempus::StepperRKModifierDefault
Default modifier for StepperRK.
Definition:
Tempus_StepperRKModifierDefault.hpp:31
Tempus::StepperRKModifierBase
Base modifier for StepperRK.
Definition:
Tempus_StepperRKModifierBase.hpp:51
src
Tempus_StepperRKModifierDefault.hpp
Generated on Tue Nov 12 2024 09:36:31 for Tempus by
1.8.5