Tempus  Version of the Day
Time Integration
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Tempus_StepperRKAppAction.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_StepperRKAppAction_hpp
10 #define Tempus_StepperRKAppAction_hpp
11 
12 #include "Tempus_config.hpp"
13 #include "Tempus_SolutionHistory.hpp"
14 
15 
16 namespace Tempus {
17 
18 // Forward Declaration for recursive includes (this AppAction <--> Stepper)
19 template<class Scalar> class StepperRKBase;
20 
21 /** \brief Application Action for StepperRKBase.
22  *
23  * This class provides a means to apply various actions with the
24  * RK time step. The data available to this class is solution
25  * variables (through SolutionHistory), and stepper data (through
26  * the Stepper). It allows the application to just observe this
27  * data (i.e., use but not change the data) to change any of it
28  * (USER BEWARE!).
29  *
30  * The locations of the RK AppActions (ACTION_LOCATION) in takeStep
31  * are documented in each of the RK Algorithm sections:
32  * StepperExplicitRK, StepperDIRK and StepperIMEX_RK.
33  */
34 template<class Scalar>
36 {
37 public:
38 
39  /// Indicates the location of application action (see algorithm).
41  BEGIN_STEP, ///< At the beginning of the step.
42  BEGIN_STAGE, ///< At the beginning of the stage.
43  BEFORE_SOLVE, ///< Before the implicit solve.
44  AFTER_SOLVE, ///< After the implicit solve.
45  BEFORE_EXPLICIT_EVAL, ///< Before the explicit evaluation.
46  END_STAGE, ///< At the end of the stage.
47  END_STEP ///< At the end of the step.
48  };
49 
50  /// Constructor
52 
53  /// Destructor
54  virtual ~StepperRKAppAction(){}
55 
56  /// Execute application action for RK Stepper.
57  virtual void execute(
58  Teuchos::RCP<SolutionHistory<Scalar> > sh,
59  Teuchos::RCP<StepperRKBase<Scalar> > stepper,
60  const typename StepperRKAppAction<Scalar>::ACTION_LOCATION actLoc) = 0;
61 };
62 
63 } // namespace Tempus
64 
65 #endif // Tempus_StepperRKAppAction_hpp
virtual ~StepperRKAppAction()
Destructor.
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 execute(Teuchos::RCP< SolutionHistory< Scalar > > sh, Teuchos::RCP< StepperRKBase< Scalar > > stepper, const typename StepperRKAppAction< Scalar >::ACTION_LOCATION actLoc)=0
Execute application action for RK Stepper.