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: 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 
20 namespace Tempus {
21 
30 template<class Scalar>
32  : virtual public Tempus::StepperRKModifierBase<Scalar>
33 {
34 public:
35 
38 
41 
43  virtual void modify(
45  Teuchos::RCP<StepperRKBase<Scalar> > /* stepper */,
46  const typename StepperRKAppAction<Scalar>::ACTION_LOCATION actLoc)
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
#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.