10 #ifndef Tempus_StepperIMEX_RK_decl_hpp
11 #define Tempus_StepperIMEX_RK_decl_hpp
13 #include "Tempus_config.hpp"
15 #include "Tempus_StepperImplicit.hpp"
16 #include "Tempus_WrapperModelEvaluatorPairIMEX_Basic.hpp"
283 template <
class Scalar>
298 bool useFSAL, std::string ICConsistency,
bool ICConsistencyCheck,
299 bool zeroInitialGuess,
301 std::string stepperType,
316 std::string stepperType =
"",
323 std::string stepperType);
389 std::vector<Teuchos::RCP<Thyra::VectorBase<Scalar> > >&
getStageF()
393 std::vector<Teuchos::RCP<Thyra::VectorBase<Scalar> > >&
getStageG()
403 return Scalar(1.0) / (dt * A(0, 0));
406 virtual Scalar
getBeta(
const Scalar)
const {
return Scalar(1.0); }
420 Scalar stepSize, Scalar stageNumber,
425 Scalar stepSize, Scalar stageNumber,
436 std::vector<Teuchos::RCP<Thyra::VectorBase<Scalar> > >
stageF_;
437 std::vector<Teuchos::RCP<Thyra::VectorBase<Scalar> > >
stageG_;
454 template <
typename Scalar>
474 xDotDot = Teuchos::null;
481 Thyra::V_StVpStV(xDot.ptr(),
s_, *x, -
s_, *
xTilde_);
498 template <
class Scalar>
504 #endif // Tempus_StepperIMEX_RK_decl_hpp
virtual void describe(Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel) const
void setOrder(Scalar order)
virtual void setImplicitTableau(Teuchos::RCP< const RKButcherTableau< Scalar > > implicitTableau)
Set the implicit tableau from tableau.
virtual Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > getModel() const
virtual Teuchos::RCP< const RKButcherTableau< Scalar > > getImplicitTableau() const
Return implicit tableau.
virtual Scalar getOrder() const
Teuchos::RCP< WrapperModelEvaluator< Scalar > > wrapperModel_
Teuchos::RCP< const Teuchos::ParameterList > getValidParameters() const
ModelEvaluator pair for implicit and explicit (IMEX) evaulations.
std::vector< Teuchos::RCP< Thyra::VectorBase< Scalar > > > & getStageF()
Implicit-Explicit Runge-Kutta (IMEX-RK) time stepper.
virtual void setExplicitTableau(Teuchos::RCP< const RKButcherTableau< Scalar > > explicitTableau)
Set the explicit tableau from tableau.
Teuchos::RCP< Thyra::VectorBase< Scalar > > xTilde_
virtual bool isMultiStepMethod() const
virtual ~StepperIMEX_RKTimeDerivative()
Destructor.
virtual void initialize(Scalar s, Teuchos::RCP< const Thyra::VectorBase< Scalar > > xTilde)
StepperIMEX_RKTimeDerivative(Scalar s, Teuchos::RCP< const Thyra::VectorBase< Scalar > > xTilde)
Constructor.
virtual void compute(Teuchos::RCP< const Thyra::VectorBase< Scalar > > x, Teuchos::RCP< Thyra::VectorBase< Scalar > > xDot, Teuchos::RCP< Thyra::VectorBase< Scalar > > xDotDot=Teuchos::null)
Compute the time derivative.
Teuchos::RCP< const RKButcherTableau< Scalar > > implicitTableau_
Teuchos::RCP< Thyra::VectorBase< Scalar > > & getXTilde()
StepperIMEX_RK(std::string stepperType="IMEX RK SSP2")
Default constructor.
virtual Teuchos::RCP< const RKButcherTableau< Scalar > > getExplicitTableau() const
Return explicit tableau.
virtual bool isImplicit() const
Base class for Runge-Kutta methods, ExplicitRK, DIRK and IMEX.
virtual void setModelPair(const Teuchos::RCP< WrapperModelEvaluatorPairIMEX_Basic< Scalar > > &mePair)
Create WrapperModelPairIMEX from user-supplied ModelEvaluator pair.
Thyra Base interface for implicit time steppers.
Application Action for StepperRKBase.
Teuchos::RCP< const RKButcherTableau< Scalar > > explicitTableau_
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 Scalar getOrderMin() const
virtual bool isExplicitImplicit() const
void evalExplicitModel(const Teuchos::RCP< const Thyra::VectorBase< Scalar > > &X, Scalar time, Scalar stepSize, Scalar stageNumber, const Teuchos::RCP< Thyra::VectorBase< Scalar > > &F) const
std::vector< Teuchos::RCP< Thyra::VectorBase< Scalar > > > stageF_
virtual bool isExplicit() const
std::vector< Teuchos::RCP< Thyra::VectorBase< Scalar > > > & getStageG()
virtual void setTableaus(std::string stepperType="", Teuchos::RCP< const RKButcherTableau< Scalar > > explicitTableau=Teuchos::null, Teuchos::RCP< const RKButcherTableau< Scalar > > implicitTableau=Teuchos::null)
Set both the explicit and implicit tableau from ParameterList.
SolutionHistory is basically a container of SolutionStates. SolutionHistory maintains a collection of...
virtual OrderODE getOrderODE() const
virtual Scalar getBeta(const Scalar) const
Return beta = d(x)/dx.
Stepper integrates first-order ODEs.
virtual bool isValidSetup(Teuchos::FancyOStream &out) const
void evalImplicitModelExplicitly(const Teuchos::RCP< const Thyra::VectorBase< Scalar > > &X, Scalar time, Scalar stepSize, Scalar stageNumber, const Teuchos::RCP< Thyra::VectorBase< Scalar > > &G) const
virtual Scalar getOrderMax() const
This interface defines the time derivative connection between an implicit Stepper and WrapperModelEva...
virtual bool isOneStepMethod() const
virtual Teuchos::RCP< const RKButcherTableau< Scalar > > getTableau() const
Returns the explicit tableau!
std::vector< Teuchos::RCP< Thyra::VectorBase< Scalar > > > stageG_
virtual void setInitialConditions(const Teuchos::RCP< SolutionHistory< Scalar > > &solutionHistory)
Set the initial conditions and make them consistent.
virtual Teuchos::RCP< Tempus::StepperState< Scalar > > getDefaultStepperState()
Provide a StepperState to the SolutionState. This Stepper does not have any special state data...
Time-derivative interface for IMEX RK.
Teuchos::RCP< const Thyra::VectorBase< Scalar > > xTilde_
virtual void setModel(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &appModel)
Set the model.
Teuchos::RCP< StepperIMEX_RK< Scalar > > createStepperIMEX_RK(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &model, std::string stepperType, Teuchos::RCP< Teuchos::ParameterList > pl)
Nonmember constructor - ModelEvaluator and ParameterList.
virtual Scalar getAlpha(const Scalar dt) const
Return alpha = d(xDot)/dx.