Tempus  Version of the Day
Time Integration
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Tempus_StepperSubcyclingAppAction.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_StepperSubcyclingAppAction_hpp
10 #define Tempus_StepperSubcyclingAppAction_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 StepperSubcycling;
20 
21 /** \brief Application Action for StepperSubcycling.
22  *
23  * This class provides a means to apply various actions with the Subcycling time step.
24  * The data available to this class is solution variables (through
25  * SolutionHistory), and stepper data (through the Stepper). It allows
26  * the application to just observe this data (i.e., use but not change the
27  * data) to change any of it (USER BEWARE!).
28  *
29  * Below is the Subcycling algorithm and includes the locations where the
30  * application can take actions (in italicized).
31  *
32  * \f{algorithm}{
33  * \renewcommand{\thealgorithm}{}
34  * \caption{Subcyling with the locations of the application actions indicated.}
35  * \begin{algorithmic}[1]
36  * \State {\it appAction.execute(solutionHistory, stepper, BEGIN\_STEP)}
37  * \State Compute $x_{n}$ from $x_{n-1}$, applying appActions from sub-steppers
38  * \State {\it appAction.execute(solutionHistory, stepper, END\_STEP)}
39  * \end{algorithmic}
40  * \f}
41  */
42 template<class Scalar>
44 {
45 public:
46 
47  /// Indicates the location of application action (see algorithm).
49  BEGIN_STEP, ///< At the beginning of the step.
50  END_STEP ///< At the end of the step.
51  };
52 
53  /// Constructor
55 
56  /// Destructor
58 
59  /// Execute application action for Subcycling Stepper.
60  virtual void execute(
61  Teuchos::RCP<SolutionHistory<Scalar> > sh,
62  Teuchos::RCP<StepperSubcycling<Scalar> > stepper,
63  const typename StepperSubcyclingAppAction<Scalar>::ACTION_LOCATION actLoc) = 0;
64 };
65 
66 } // namespace Tempus
67 
68 #endif // Tempus_StepperSubcyclingAppAction_hpp
Application Action for StepperSubcycling.
SolutionHistory is basically a container of SolutionStates. SolutionHistory maintains a collection of...
virtual void execute(Teuchos::RCP< SolutionHistory< Scalar > > sh, Teuchos::RCP< StepperSubcycling< Scalar > > stepper, const typename StepperSubcyclingAppAction< Scalar >::ACTION_LOCATION actLoc)=0
Execute application action for Subcycling Stepper.
ACTION_LOCATION
Indicates the location of application action (see algorithm).