9 #ifndef Tempus_StepperIMEX_RK_decl_hpp
10 #define Tempus_StepperIMEX_RK_decl_hpp
12 #include "Tempus_config.hpp"
15 #include "Tempus_StepperImplicit.hpp"
16 #include "Tempus_WrapperModelEvaluatorPairIMEX_Basic.hpp"
17 #ifndef TEMPUS_HIDE_DEPRECATED_CODE
18 #include "Tempus_StepperRKObserverComposite.hpp"
285 template<
class Scalar>
299 #ifndef TEMPUS_HIDE_DEPRECATED_CODE
301 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& appModel,
303 const Teuchos::RCP<Thyra::NonlinearSolverBase<Scalar> >& solver,
305 std::string ICConsistency,
306 bool ICConsistencyCheck,
307 bool zeroInitialGuess,
308 std::string stepperType,
314 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& appModel,
315 const Teuchos::RCP<Thyra::NonlinearSolverBase<Scalar> >& solver,
317 std::string ICConsistency,
318 bool ICConsistencyCheck,
319 bool zeroInitialGuess,
321 std::string stepperType,
330 virtual Teuchos::RCP<const RKButcherTableau<Scalar> >
getTableau()
const
334 virtual void setTableaus( std::string stepperType =
"",
355 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& appModel);
357 virtual Teuchos::RCP<const Thyra::ModelEvaluator<Scalar> >
getModel()
364 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& explicitModel,
365 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& implicitModel);
367 #ifndef TEMPUS_HIDE_DEPRECATED_CODE
371 virtual Teuchos::RCP<StepperObserver<Scalar> >
getObserver()
const
408 return Scalar(1.0)/(dt*A(0,0));
411 virtual Scalar
getBeta (
const Scalar )
const {
return Scalar(1.0); }
417 virtual void describe(Teuchos::FancyOStream & out,
418 const Teuchos::EVerbosityLevel verbLevel)
const;
421 virtual bool isValidSetup(Teuchos::FancyOStream & out)
const;
424 const Teuchos::RCP<
const Thyra::VectorBase<Scalar> > & X,
425 Scalar time, Scalar stepSize, Scalar stageNumber,
426 const Teuchos::RCP<Thyra::VectorBase<Scalar> > & G)
const;
429 const Teuchos::RCP<
const Thyra::VectorBase<Scalar> > & X,
430 Scalar time, Scalar stepSize, Scalar stageNumber,
431 const Teuchos::RCP<Thyra::VectorBase<Scalar> > & F)
const;
444 std::vector<Teuchos::RCP<Thyra::VectorBase<Scalar> > >
stageF_;
445 std::vector<Teuchos::RCP<Thyra::VectorBase<Scalar> > >
stageG_;
447 Teuchos::RCP<Thyra::VectorBase<Scalar> >
xTilde_;
449 #ifndef TEMPUS_HIDE_DEPRECATED_CODE
468 template <
typename Scalar>
476 Scalar s, Teuchos::RCP<
const Thyra::VectorBase<Scalar> > xTilde)
484 Teuchos::RCP<
const Thyra::VectorBase<Scalar> > x,
485 Teuchos::RCP< Thyra::VectorBase<Scalar> > xDot,
486 Teuchos::RCP< Thyra::VectorBase<Scalar> > xDotDot = Teuchos::null)
488 xDotDot = Teuchos::null;
499 Teuchos::RCP<
const Thyra::VectorBase<Scalar> > xTilde)
504 Teuchos::RCP<const Thyra::VectorBase<Scalar> >
xTilde_;
510 #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 RKButcherTableau< Scalar > > getImplicitTableau() const
Return implicit tableau.
virtual Scalar getOrder() const
Teuchos::RCP< StepperRKObserverComposite< Scalar > > stepperObserver_
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()
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.
virtual Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > getModel()
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.
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.
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 void setObserver(Teuchos::RCP< StepperObserver< Scalar > > obs=Teuchos::null)
Set Observer.
virtual OrderODE getOrderODE() const
virtual bool getICConsistencyCheckDefault() 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...
virtual Teuchos::RCP< StepperObserver< Scalar > > getObserver() const
Get Observer.
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.