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: 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_StepperExplicitRK_decl_hpp
11 #define Tempus_StepperExplicitRK_decl_hpp
12 
13 #include "Tempus_config.hpp"
14 #include "Tempus_StepperRKBase.hpp"
15 #include "Tempus_StepperExplicit.hpp"
16 
17 namespace Tempus {
18 
94 template <class Scalar>
95 class StepperExplicitRK : virtual public Tempus::StepperExplicit<Scalar>,
96  virtual public Tempus::StepperRKBase<Scalar> {
97  public:
99 
100  virtual void initialize();
102 
104  virtual void setModel(
105  const Teuchos::RCP<const Thyra::ModelEvaluator<Scalar> >& appModel);
106 
108  virtual void setInitialConditions(
109  const Teuchos::RCP<SolutionHistory<Scalar> >& solutionHistory);
110 
112  virtual void takeStep(
113  const Teuchos::RCP<SolutionHistory<Scalar> >& solutionHistory);
114 
117  virtual Scalar getInitTimeStep(
118  const Teuchos::RCP<SolutionHistory<Scalar> >& solutionHistory) const;
119 
120  virtual bool isExplicit() const { return true; }
121  virtual bool isImplicit() const { return false; }
122  virtual bool isExplicitImplicit() const
123  {
124  return isExplicit() && isImplicit();
125  }
126  virtual bool isOneStepMethod() const { return true; }
127  virtual bool isMultiStepMethod() const { return !isOneStepMethod(); }
128 
129  virtual OrderODE getOrderODE() const { return FIRST_ORDER_ODE; }
130 
131  virtual std::string getDescription() const = 0;
133 
135 
137 
139 
140  virtual void describe(Teuchos::FancyOStream& out,
141  const Teuchos::EVerbosityLevel verbLevel) const;
143 
144  virtual bool isValidSetup(Teuchos::FancyOStream& out) const;
145 
146  protected:
148  virtual void setupDefault();
149 
151  virtual void setup(
152  const Teuchos::RCP<const Thyra::ModelEvaluator<Scalar> >& appModel,
153  bool useFSAL, std::string ICConsistency, bool ICConsistencyCheck,
154  bool useEmbedded,
155  const Teuchos::RCP<StepperRKAppAction<Scalar> >& stepperRKAppAction);
156 
157  virtual void setupTableau() = 0;
158 
159  virtual void setEmbeddedMemory();
160 
161  std::vector<Teuchos::RCP<Thyra::VectorBase<Scalar> > > stageXDot_;
162 };
163 
164 } // namespace Tempus
165 
166 #endif // Tempus_StepperExplicitRK_decl_hpp
virtual void setModel(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &appModel)
Set model.
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.