Tempus  Version of the Day
Time Integration
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Tempus_StepperExplicitRK_decl.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_StepperExplicitRK_decl_hpp
10 #define Tempus_StepperExplicitRK_decl_hpp
11 
12 #include "Tempus_config.hpp"
13 #include "Tempus_StepperRKBase.hpp"
14 #include "Tempus_StepperExplicit.hpp"
15 
16 
17 namespace Tempus {
18 
99 template<class Scalar>
100 class StepperExplicitRK : virtual public Tempus::StepperExplicit<Scalar>,
101  virtual public Tempus::StepperRKBase<Scalar>
102 {
103 
104 public:
105 
107 
108  virtual void initialize();
110 
112  virtual void setInitialConditions (
113  const Teuchos::RCP<SolutionHistory<Scalar> >& solutionHistory);
114 
116  virtual void takeStep(
117  const Teuchos::RCP<SolutionHistory<Scalar> >& solutionHistory);
118 
121  virtual Scalar getInitTimeStep(
122  const Teuchos::RCP<SolutionHistory<Scalar> >& solutionHistory) const;
123 
124  virtual bool isExplicit() const {return true;}
125  virtual bool isImplicit() const {return false;}
126  virtual bool isExplicitImplicit() const
127  {return isExplicit() && isImplicit();}
128  virtual bool isOneStepMethod() const {return true;}
129  virtual bool isMultiStepMethod() const {return !isOneStepMethod();}
130 
131  virtual OrderODE getOrderODE() const {return FIRST_ORDER_ODE;}
132 
133  virtual std::string getDescription() const = 0;
135 
137 
139 
141 
142  virtual void describe(Teuchos::FancyOStream & out,
143  const Teuchos::EVerbosityLevel verbLevel) const;
145 
146  virtual bool isValidSetup(Teuchos::FancyOStream & out) const;
147 
148 
149 protected:
150 
152  virtual void setupDefault();
153 
155  virtual void setup(
156  const Teuchos::RCP<const Thyra::ModelEvaluator<Scalar> >& appModel,
157  bool useFSAL,
158  std::string ICConsistency,
159  bool ICConsistencyCheck,
160  bool useEmbedded,
161  const Teuchos::RCP<StepperRKAppAction<Scalar> >& stepperRKAppAction);
162 
163  virtual void setupTableau() = 0;
164 
165 
166  std::vector<Teuchos::RCP<Thyra::VectorBase<Scalar> > > stageXDot_;
167 
168 };
169 
170 } // namespace Tempus
171 
172 #endif // Tempus_StepperExplicitRK_decl_hpp
Explicit Runge-Kutta time stepper.
virtual std::string getDescription() const =0
virtual void setupDefault()
Default setup for constructor.
virtual Scalar getInitTimeStep(const Teuchos::RCP< SolutionHistory< Scalar > > &solutionHistory) const
virtual void describe(Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel) const
std::vector< Teuchos::RCP< Thyra::VectorBase< Scalar > > > stageXDot_
virtual bool isValidSetup(Teuchos::FancyOStream &out) const
virtual void setInitialConditions(const Teuchos::RCP< SolutionHistory< Scalar > > &solutionHistory)
Set the initial conditions and make them consistent.
Base class for Runge-Kutta methods, ExplicitRK, DIRK and IMEX.
virtual void setupTableau()=0
Application Action for StepperRKBase.
virtual Teuchos::RCP< const Teuchos::ParameterList > getValidParameters() const
SolutionHistory is basically a container of SolutionStates. SolutionHistory maintains a collection of...
Teuchos::RCP< Teuchos::ParameterList > getValidParametersBasicERK() const
Stepper integrates first-order ODEs.
virtual void takeStep(const Teuchos::RCP< SolutionHistory< Scalar > > &solutionHistory)
Take the specified timestep, dt, and return true if successful.
virtual void initialize()
Initialize during construction and after changing input parameters.
virtual Teuchos::RCP< Tempus::StepperState< Scalar > > getDefaultStepperState()
Get a default (initial) StepperState.
Thyra Base interface for implicit time steppers.
virtual void setup(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &appModel, bool useFSAL, std::string ICConsistency, bool ICConsistencyCheck, bool useEmbedded, const Teuchos::RCP< StepperRKAppAction< Scalar > > &stepperRKAppAction)
Setup for constructor.