9 #ifndef Tempus_StepperIMEX_RK_decl_hpp
10 #define Tempus_StepperIMEX_RK_decl_hpp
12 #include "Tempus_config.hpp"
14 #include "Tempus_StepperImplicit.hpp"
15 #include "Tempus_WrapperModelEvaluatorPairIMEX_Basic.hpp"
227 template<
class Scalar>
243 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& appModel,
244 Teuchos::RCP<Teuchos::ParameterList> pList);
248 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& appModel,
249 std::string stepperType =
"IMEX RK SSP2");
253 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& models,
254 std::string stepperType, Teuchos::RCP<Teuchos::ParameterList> pList);
259 virtual void setTableaus(Teuchos::RCP<Teuchos::ParameterList> pList,
260 std::string stepperType =
"");
264 Teuchos::RCP<Teuchos::ParameterList> pList);
272 Teuchos::RCP<Teuchos::ParameterList> pList);
279 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& appModel);
281 virtual Teuchos::RCP<const Thyra::ModelEvaluator<Scalar> >
getModel()
288 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& explicitModel,
289 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& implicitModel);
324 return Scalar(1.0)/(dt*A(0,0));
327 virtual Scalar
getBeta (
const Scalar )
const {
return Scalar(1.0); }
341 virtual void describe(Teuchos::FancyOStream & out,
342 const Teuchos::EVerbosityLevel verbLevel)
const;
346 const Teuchos::RCP<
const Thyra::VectorBase<Scalar> > & X,
347 Scalar time, Scalar stepSize, Scalar stageNumber,
348 const Teuchos::RCP<Thyra::VectorBase<Scalar> > & G)
const;
351 const Teuchos::RCP<
const Thyra::VectorBase<Scalar> > & X,
352 Scalar time, Scalar stepSize, Scalar stageNumber,
353 const Teuchos::RCP<Thyra::VectorBase<Scalar> > & F)
const;
364 Teuchos::RCP<Thyra::VectorBase<Scalar> >
stageX_;
365 std::vector<Teuchos::RCP<Thyra::VectorBase<Scalar> > >
stageF_;
366 std::vector<Teuchos::RCP<Thyra::VectorBase<Scalar> > >
stageG_;
368 Teuchos::RCP<Thyra::VectorBase<Scalar> >
xTilde_;
387 template <
typename Scalar>
395 Scalar s, Teuchos::RCP<
const Thyra::VectorBase<Scalar> > xTilde)
403 Teuchos::RCP<
const Thyra::VectorBase<Scalar> > x,
404 Teuchos::RCP< Thyra::VectorBase<Scalar> > xDot,
405 Teuchos::RCP< Thyra::VectorBase<Scalar> > xDotDot = Teuchos::null)
407 xDotDot = Teuchos::null;
418 Teuchos::RCP<
const Thyra::VectorBase<Scalar> > xTilde)
423 Teuchos::RCP<const Thyra::VectorBase<Scalar> >
xTilde_;
429 #endif // Tempus_StepperIMEX_RK_decl_hpp
virtual void describe(Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel) const
virtual Scalar getOrder() const
Teuchos::RCP< WrapperModelEvaluator< Scalar > > wrapperModel_
virtual void setTableaus(Teuchos::RCP< Teuchos::ParameterList > pList, std::string stepperType="")
Set both the explicit and implicit tableau from ParameterList.
virtual std::string description() const
Teuchos::RCP< const Teuchos::ParameterList > getValidParameters() const
ModelEvaluator pair for implicit and explicit (IMEX) evaulations.
Implicit-Explicit Runge-Kutta (IMEX-RK) time stepper.
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_
virtual bool isImplicit() const
Teuchos::RCP< StepperIMEX_RKObserver< Scalar > > stepperIMEX_RKObserver_
virtual void setModelPair(const Teuchos::RCP< WrapperModelEvaluatorPairIMEX_Basic< Scalar > > &mePair)
Create WrapperModelPairIMEX from user-supplied ModelEvaluator pair.
virtual Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > getModel()
Thyra Base interface for implicit time steppers.
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.
StepperIMEX_RK()
Default constructor.
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_
StepperObserver class for Stepper class.
Teuchos::RCP< SolutionHistory< Scalar > > solutionHistory(Teuchos::RCP< Teuchos::ParameterList > pList=Teuchos::null)
Nonmember constructor.
Teuchos::RCP< Teuchos::ParameterList > unsetParameterList()
virtual bool isExplicit() const
SolutionHistory is basically a container of SolutionStates. SolutionHistory maintains a collection of...
virtual void setObserver(Teuchos::RCP< StepperObserver< Scalar > > obs=Teuchos::null)
Set Observer.
virtual OrderODE getOrderODE() const
void setParameterList(const Teuchos::RCP< Teuchos::ParameterList > &pl)
virtual Scalar getBeta(const Scalar) const
Return beta = d(x)/dx.
Stepper integrates first-order ODEs.
virtual void setExplicitTableau(std::string stepperType, Teuchos::RCP< Teuchos::ParameterList > pList)
Set the explicit tableau from ParameterList.
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
Teuchos::RCP< Thyra::VectorBase< Scalar > > stageX_
virtual void setImplicitTableau(std::string stepperType, Teuchos::RCP< Teuchos::ParameterList > pList)
Set the implicit tableau from ParameterList.
This interface defines the time derivative connection between an implicit Stepper and WrapperModelEva...
virtual bool isOneStepMethod() const
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...
Teuchos::RCP< Teuchos::ParameterList > getDefaultParameters() const
Time-derivative interface for IMEX RK.
Teuchos::RCP< const Thyra::VectorBase< Scalar > > xTilde_
virtual void setModel(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &appModel)
virtual Scalar getAlpha(const Scalar dt) const
Return alpha = d(xDot)/dx.
Teuchos::RCP< Teuchos::ParameterList > getNonconstParameterList()