9 #ifndef Tempus_StepperIMEX_RK_Partition_decl_hpp
10 #define Tempus_StepperIMEX_RK_Partition_decl_hpp
12 #include "Tempus_config.hpp"
14 #include "Tempus_StepperImplicit.hpp"
15 #include "Tempus_WrapperModelEvaluatorPairPartIMEX_Basic.hpp"
16 #include "Tempus_StepperRKObserverComposite.hpp"
226 template<
class Scalar>
240 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& appModel,
242 const Teuchos::RCP<Thyra::NonlinearSolverBase<Scalar> >& solver,
244 std::string ICConsistency,
245 bool ICConsistencyCheck,
246 bool zeroInitialGuess,
247 std::string stepperType,
255 virtual void setTableaus(std::string stepperType =
"",
268 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& appModel);
270 virtual Teuchos::RCP<const Thyra::ModelEvaluator<Scalar> >
getModel()
278 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& explicitModel,
279 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& implicitModel);
284 virtual Teuchos::RCP<StepperObserver<Scalar> >
getObserver()
const
317 return Scalar(1.0)/(dt*A(0,0));
320 virtual Scalar
getBeta (
const Scalar )
const {
return Scalar(1.0); }
326 virtual void describe(Teuchos::FancyOStream & out,
327 const Teuchos::EVerbosityLevel verbLevel)
const;
331 const Teuchos::RCP<
const Thyra::VectorBase<Scalar> > & X,
332 const Teuchos::RCP<
const Thyra::VectorBase<Scalar> > & Y,
333 Scalar time, Scalar stepSize, Scalar stageNumber,
334 const Teuchos::RCP<Thyra::VectorBase<Scalar> > & G)
const;
337 const Teuchos::RCP<
const Thyra::VectorBase<Scalar> > & X,
338 Scalar time, Scalar stepSize, Scalar stageNumber,
339 const Teuchos::RCP<Thyra::VectorBase<Scalar> > & F)
const;
350 Teuchos::RCP<Thyra::VectorBase<Scalar> >
stageZ_;
351 std::vector<Teuchos::RCP<Thyra::VectorBase<Scalar> > >
stageF_;
352 std::vector<Teuchos::RCP<Thyra::VectorBase<Scalar> > >
stageGx_;
354 Teuchos::RCP<Thyra::VectorBase<Scalar> >
xTilde_;
373 template <
typename Scalar>
381 Scalar s, Teuchos::RCP<
const Thyra::VectorBase<Scalar> > xTilde)
389 Teuchos::RCP<
const Thyra::VectorBase<Scalar> > x,
390 Teuchos::RCP< Thyra::VectorBase<Scalar> > xDot,
391 Teuchos::RCP< Thyra::VectorBase<Scalar> > xDotDot = Teuchos::null)
393 xDotDot = Teuchos::null;
404 Teuchos::RCP<
const Thyra::VectorBase<Scalar> > xTilde)
409 Teuchos::RCP<const Thyra::VectorBase<Scalar> >
xTilde_;
415 #endif // Tempus_StepperIMEX_RK_Partition_decl_hpp
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 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
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
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.
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< StepperObserver< Scalar > > getObserver() const
Get Observer.
Teuchos::RCP< SolutionHistory< Scalar > > solutionHistory(Teuchos::RCP< Teuchos::ParameterList > pList=Teuchos::null)
Nonmember constructor.
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.
Stepper integrates first-order ODEs.
virtual bool isOneStepMethod() const
virtual void initialize(Scalar s, Teuchos::RCP< const Thyra::VectorBase< Scalar > > xTilde)
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
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.
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.