9 #ifndef Tempus_StepperIMEX_RK_Partition_decl_hpp
10 #define Tempus_StepperIMEX_RK_Partition_decl_hpp
12 #include "Tempus_config.hpp"
15 #include "Tempus_StepperImplicit.hpp"
16 #include "Tempus_WrapperModelEvaluatorPairPartIMEX_Basic.hpp"
17 #ifndef TEMPUS_HIDE_DEPRECATED_CODE
18 #include "Tempus_StepperRKObserverComposite.hpp"
316 template<
class Scalar>
330 #ifndef TEMPUS_HIDE_DEPRECATED_CODE
332 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& appModel,
334 const Teuchos::RCP<Thyra::NonlinearSolverBase<Scalar> >& solver,
336 std::string ICConsistency,
337 bool ICConsistencyCheck,
338 bool zeroInitialGuess,
339 std::string stepperType,
345 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& appModel,
346 const Teuchos::RCP<Thyra::NonlinearSolverBase<Scalar> >& solver,
348 std::string ICConsistency,
349 bool ICConsistencyCheck,
350 bool zeroInitialGuess,
352 std::string stepperType,
360 virtual Teuchos::RCP<const RKButcherTableau<Scalar> >
getTableau()
const
364 virtual void setTableaus(std::string stepperType =
"",
385 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& appModel);
387 virtual Teuchos::RCP<const Thyra::ModelEvaluator<Scalar> >
getModel()
395 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& explicitModel,
396 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& implicitModel);
398 #ifndef TEMPUS_HIDE_DEPRECATED_CODE
402 virtual Teuchos::RCP<StepperObserver<Scalar> >
getObserver()
const
444 return Scalar(1.0)/(dt*A(0,0));
447 virtual Scalar
getBeta (
const Scalar )
const {
return Scalar(1.0); }
453 virtual void describe(Teuchos::FancyOStream & out,
454 const Teuchos::EVerbosityLevel verbLevel)
const;
457 virtual bool isValidSetup(Teuchos::FancyOStream & out)
const;
460 const Teuchos::RCP<
const Thyra::VectorBase<Scalar> > & X,
461 const Teuchos::RCP<
const Thyra::VectorBase<Scalar> > & Y,
462 Scalar time, Scalar stepSize, Scalar stageNumber,
463 const Teuchos::RCP<Thyra::VectorBase<Scalar> > & G)
const;
466 const Teuchos::RCP<
const Thyra::VectorBase<Scalar> > & X,
467 Scalar time, Scalar stepSize, Scalar stageNumber,
468 const Teuchos::RCP<Thyra::VectorBase<Scalar> > & F)
const;
479 Teuchos::RCP<Thyra::VectorBase<Scalar> >
stageZ_;
480 std::vector<Teuchos::RCP<Thyra::VectorBase<Scalar> > >
stageF_;
481 std::vector<Teuchos::RCP<Thyra::VectorBase<Scalar> > >
stageGx_;
483 Teuchos::RCP<Thyra::VectorBase<Scalar> >
xTilde_;
485 #ifndef TEMPUS_HIDE_DEPRECATED_CODE
504 template <
typename Scalar>
512 Scalar s, Teuchos::RCP<
const Thyra::VectorBase<Scalar> > xTilde)
520 Teuchos::RCP<
const Thyra::VectorBase<Scalar> > x,
521 Teuchos::RCP< Thyra::VectorBase<Scalar> > xDot,
522 Teuchos::RCP< Thyra::VectorBase<Scalar> > xDotDot = Teuchos::null)
524 xDotDot = Teuchos::null;
535 Teuchos::RCP<
const Thyra::VectorBase<Scalar> > xTilde)
540 Teuchos::RCP<const Thyra::VectorBase<Scalar> >
xTilde_;
546 #endif // Tempus_StepperIMEX_RK_Partition_decl_hpp
Teuchos::RCP< Thyra::VectorBase< Scalar > > getStageX()
Return the full stage solution which is Z (the concat of X and Y) for IMEX Partition.
virtual Scalar getAlpha(const Scalar dt) const
Return alpha = d(xDot)/dx.
Teuchos::RCP< const Teuchos::ParameterList > getValidParameters() const
Teuchos::RCP< WrapperModelEvaluator< Scalar > > wrapperModel_
Teuchos::RCP< Thyra::VectorBase< Scalar > > xTilde_
StepperIMEX_RK_Partition()
Default constructor.
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.
virtual Teuchos::RCP< const RKButcherTableau< Scalar > > getImplicitTableau() const
Return implicit tableau.
virtual void setModelPair(const Teuchos::RCP< WrapperModelEvaluatorPairPartIMEX_Basic< Scalar > > &modelPair)
Create WrapperModelPairIMEX from user-supplied ModelEvaluator pair.
virtual bool isExplicitImplicit() const
Teuchos::RCP< const RKButcherTableau< Scalar > > implicitTableau_
Partitioned Implicit-Explicit Runge-Kutta (IMEX-RK) time stepper.
virtual Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > getModel()
virtual Scalar getOrderMax() const
std::vector< Teuchos::RCP< Thyra::VectorBase< Scalar > > > & getStageGx()
void evalExplicitModel(const Teuchos::RCP< const Thyra::VectorBase< Scalar > > &X, Scalar time, Scalar stepSize, Scalar stageNumber, const Teuchos::RCP< Thyra::VectorBase< Scalar > > &F) const
Teuchos::RCP< Thyra::VectorBase< Scalar > > stageZ_
StepperIMEX_RKPartTimeDerivative(Scalar s, Teuchos::RCP< const Thyra::VectorBase< Scalar > > xTilde)
Constructor.
virtual OrderODE getOrderODE() const
Base class for Runge-Kutta methods, ExplicitRK, DIRK and IMEX.
std::vector< Teuchos::RCP< Thyra::VectorBase< Scalar > > > stageF_
virtual bool isImplicit() const
Thyra Base interface for implicit time steppers.
virtual Teuchos::RCP< Tempus::StepperState< Scalar > > getDefaultStepperState()
Provide a StepperState to the SolutionState. This Stepper does not have any special state data...
ModelEvaluator pair for implicit and explicit (IMEX) evaulations.
Application Action for StepperRKBase.
virtual bool isExplicit() const
virtual ~StepperIMEX_RKPartTimeDerivative()
Destructor.
void evalImplicitModelExplicitly(const Teuchos::RCP< const Thyra::VectorBase< Scalar > > &X, const Teuchos::RCP< const Thyra::VectorBase< Scalar > > &Y, Scalar time, Scalar stepSize, Scalar stageNumber, const Teuchos::RCP< Thyra::VectorBase< Scalar > > &G) const
StepperObserver class for Stepper class.
virtual Teuchos::RCP< const RKButcherTableau< Scalar > > getExplicitTableau() const
Return explicit tableau.
virtual Teuchos::RCP< StepperObserver< Scalar > > getObserver() const
Get Observer.
void setOrder(Scalar order)
SolutionHistory is basically a container of SolutionStates. SolutionHistory maintains a collection of...
virtual void setExplicitTableau(Teuchos::RCP< const RKButcherTableau< Scalar > > explicitTableau)
Set the explicit tableau from tableau.
virtual void setObserver(Teuchos::RCP< StepperObserver< Scalar > > obs=Teuchos::null)
Set Observer.
virtual bool isValidSetup(Teuchos::FancyOStream &out) const
Stepper integrates first-order ODEs.
std::vector< Teuchos::RCP< Thyra::VectorBase< Scalar > > > & getStageF()
virtual bool isOneStepMethod() const
virtual void initialize(Scalar s, Teuchos::RCP< const Thyra::VectorBase< Scalar > > xTilde)
virtual Teuchos::RCP< const RKButcherTableau< Scalar > > getTableau() const
Returns the explicit tableau!
Teuchos::RCP< const RKButcherTableau< Scalar > > explicitTableau_
This interface defines the time derivative connection between an implicit Stepper and WrapperModelEva...
virtual Scalar getBeta(const Scalar) const
Return beta = d(x)/dx.
virtual void setImplicitTableau(Teuchos::RCP< const RKButcherTableau< Scalar > > implicitTableau)
Set the implicit tableau from tableau.
std::vector< Teuchos::RCP< Thyra::VectorBase< Scalar > > > stageGx_
Teuchos::RCP< const Thyra::VectorBase< Scalar > > xTilde_
Time-derivative interface for Partitioned IMEX RK.
virtual void describe(Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel) const
virtual void setModel(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &appModel)
virtual Scalar getOrder() const
Teuchos::RCP< Thyra::VectorBase< Scalar > > getStageZ()
Explicitly return the full stage solution, Z.
virtual void takeStep(const Teuchos::RCP< SolutionHistory< Scalar > > &solutionHistory)
Take the specified timestep, dt, and return true if successful.
virtual Scalar getOrderMin() const
virtual void setInitialConditions(const Teuchos::RCP< SolutionHistory< Scalar > > &solutionHistory)
Set the initial conditions and make them consistent.
Teuchos::RCP< Thyra::VectorBase< Scalar > > & getXTilde()
virtual void initialize()
Initialize during construction and after changing input parameters.
virtual bool isMultiStepMethod() const
Teuchos::RCP< StepperRKObserverComposite< Scalar > > stepperObserver_
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.