Tempus  Version of the Day
Time Integration
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Tempus_StepperRKModifierDefault.hpp
Go to the documentation of this file.
1 //@HEADER
2 // *****************************************************************************
3 // Tempus: Time Integration and Sensitivity Analysis Package
4 //
5 // Copyright 2017 NTESS and the Tempus contributors.
6 // SPDX-License-Identifier: BSD-3-Clause
7 // *****************************************************************************
8 //@HEADER
9 
10 #ifndef Tempus_StepperRKModifierDefault_hpp
11 #define Tempus_StepperRKModifierDefault_hpp
12 
13 #include "Tempus_config.hpp"
15 
16 // Applications can uncomment this include in their implementation,
17 // if they need access to the stepper methods.
18 //#include "Tempus_StepperRKBase.hpp"
19 
20 namespace Tempus {
21 
30 template <class Scalar>
32  : virtual public Tempus::StepperRKModifierBase<Scalar> {
33  public:
36 
39 
41  virtual void modify(
43  Teuchos::RCP<StepperRKBase<Scalar> > /* stepper */,
44  const typename StepperRKAppAction<Scalar>::ACTION_LOCATION actLoc)
45  {
46  switch (actLoc) {
54  // No-op.
55  break;
56  }
57  default:
59  true, std::logic_error,
60  "Error - unknown action location = " + std::to_string(actLoc) +
61  "\n"
62  " Valid actions are\n"
63  " StepperRKAppAction<Scalar>::BEGIN_STEP = " +
65  "\n"
66  " StepperRKAppAction<Scalar>::BEGIN_STAGE = " +
68  "\n"
69  " StepperRKAppAction<Scalar>::BEFORE_SOLVE = " +
71  "\n"
72  " StepperRKAppAction<Scalar>::AFTER_SOLVE = " +
74  "\n"
75  " StepperRKAppAction<Scalar>::BEFORE_EXPLICIT_EVAL = " +
76  std::to_string(
78  "\n"
79  " StepperRKAppAction<Scalar>::END_STAGE = " +
81  "\n"
82  " StepperRKAppAction<Scalar>::END_STEP = " +
83  std::to_string(StepperRKAppAction<Scalar>::END_STEP) + "\n");
84  }
85  }
86 };
87 
88 } // namespace Tempus
89 
90 #endif // Tempus_StepperRKModifierDefault_hpp
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
Base class for Runge-Kutta methods, ExplicitRK, DIRK and IMEX.
Application Action for StepperRKBase.
SolutionHistory is basically a container of SolutionStates. SolutionHistory maintains a collection of...
ACTION_LOCATION
Indicates the location of application action (see algorithm).
virtual void modify(Teuchos::RCP< SolutionHistory< Scalar > >, Teuchos::RCP< StepperRKBase< Scalar > >, const typename StepperRKAppAction< Scalar >::ACTION_LOCATION actLoc)
Modify RK Stepper.