Tempus Version of the Day
Time Integration
Loading...
Searching...
No Matches
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"
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
20namespace Tempus {
21
30template<class Scalar>
32 : virtual public Tempus::StepperRKModifierBase<Scalar>
33{
34public:
35
38
41
43 virtual void modify(
44 Teuchos::RCP<SolutionHistory<Scalar> > /* sh */,
45 Teuchos::RCP<StepperRKBase<Scalar> > /* stepper */,
47 {
48 switch(actLoc) {
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
SolutionHistory is basically a container of SolutionStates. SolutionHistory maintains a collection of...
Application Action for StepperRKBase.
ACTION_LOCATION
Indicates the location of application action (see algorithm).
Base class for Runge-Kutta methods, ExplicitRK, DIRK and IMEX.
virtual void modify(Teuchos::RCP< SolutionHistory< Scalar > >, Teuchos::RCP< StepperRKBase< Scalar > >, const typename StepperRKAppAction< Scalar >::ACTION_LOCATION actLoc)
Modify RK Stepper.