|
Tempus
Version of the Day
Time Integration
|
Implicit-Explicit Runge-Kutta (IMEX-RK) time stepper. More...
#include <Tempus_StepperIMEX_RK_decl.hpp>
Public Member Functions | |
| StepperIMEX_RK (const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &appModel, std::string stepperType="IMEX RK SSP2") | |
| Constructor to use default Stepper parameters. More... | |
| StepperIMEX_RK (const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &appModel, Teuchos::RCP< Teuchos::ParameterList > pList) | |
| Constructor to specialize Stepper parameters. More... | |
| StepperIMEX_RK (const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &models, std::string stepperType, Teuchos::RCP< Teuchos::ParameterList > pList) | |
| Constructor for StepperFactory. More... | |
Basic stepper methods | |
| virtual void | setTableaus (Teuchos::RCP< Teuchos::ParameterList > pList, std::string stepperType="") |
| Set both the explicit and implicit tableau from ParameterList. More... | |
| virtual void | setExplicitTableau (std::string stepperType, Teuchos::RCP< Teuchos::ParameterList > pList) |
| Set the explicit tableau from ParameterList. More... | |
| virtual void | setExplicitTableau (Teuchos::RCP< const RKButcherTableau< Scalar > > explicitTableau) |
| Set the explicit tableau from tableau. More... | |
| virtual void | setImplicitTableau (std::string stepperType, Teuchos::RCP< Teuchos::ParameterList > pList) |
| Set the implicit tableau from ParameterList. More... | |
| virtual void | setImplicitTableau (Teuchos::RCP< const RKButcherTableau< Scalar > > implicitTableau) |
| Set the implicit tableau from tableau. More... | |
| virtual void | setModel (const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &appModel) |
| virtual Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > | getModel () |
| virtual void | setModelPair (const Teuchos::RCP< WrapperModelEvaluatorPairIMEX_Basic< Scalar > > &mePair) |
| Create WrapperModelPairIMEX from user-supplied ModelEvaluator pair. More... | |
| virtual void | setModelPair (const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &explicitModel, const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &implicitModel) |
| Create WrapperModelPairIMEX from explicit/implicit ModelEvaluators. More... | |
| virtual void | setObserver (Teuchos::RCP< StepperObserver< Scalar > > obs=Teuchos::null) |
| Set Observer. More... | |
| virtual void | initialize () |
| Initialize during construction and after changing input parameters. More... | |
| virtual void | setInitialGuess (Teuchos::RCP< const Thyra::VectorBase< Scalar > > initial_guess) |
| Pass initial guess to Newton solver (only relevant for implicit solvers) More... | |
| virtual void | takeStep (const Teuchos::RCP< SolutionHistory< Scalar > > &solutionHistory) |
| Take the specified timestep, dt, and return true if successful. More... | |
| virtual Teuchos::RCP< Tempus::StepperState< Scalar > > | getDefaultStepperState () |
| Provide a StepperState to the SolutionState. This Stepper does not have any special state data, so just provide the base class StepperState with the Stepper description. This can be checked to ensure that the input StepperState can be used by this Stepper. More... | |
| virtual Scalar | getOrder () const |
| virtual Scalar | getOrderMin () const |
| virtual Scalar | getOrderMax () const |
| virtual bool | isExplicit () const |
| virtual bool | isImplicit () const |
| virtual bool | isExplicitImplicit () const |
| virtual bool | isOneStepMethod () const |
| virtual bool | isMultiStepMethod () const |
ParameterList methods | |
| void | setParameterList (const Teuchos::RCP< Teuchos::ParameterList > &pl) |
| Teuchos::RCP< Teuchos::ParameterList > | getNonconstParameterList () |
| Teuchos::RCP< Teuchos::ParameterList > | unsetParameterList () |
| Teuchos::RCP< const Teuchos::ParameterList > | getValidParameters () const |
| Teuchos::RCP< Teuchos::ParameterList > | getDefaultParameters () const |
Public Member Functions inherited from Tempus::StepperImplicit< Scalar > | |
| virtual void | setNonConstModel (const Teuchos::RCP< Thyra::ModelEvaluator< Scalar > > &appModel) |
| virtual void | setSolver (std::string solverName) |
| Set solver via ParameterList solver name. More... | |
| virtual void | setSolver (Teuchos::RCP< Teuchos::ParameterList > solverPL=Teuchos::null) |
| Set solver via solver ParameterList. More... | |
| virtual void | setSolver (Teuchos::RCP< Thyra::NonlinearSolverBase< Scalar > > solver) |
| Set solver. More... | |
| virtual Teuchos::RCP< Thyra::NonlinearSolverBase< Scalar > > | getSolver () const |
| Get solver. More... | |
| virtual std::string | getStepperType () const |
| const Thyra::SolveStatus< Scalar > | solveImplicitODE (const Teuchos::RCP< Thyra::VectorBase< Scalar > > &x) |
| Solve problem using x in-place. More... | |
| virtual void | setZeroInitialGuess (bool zIG) |
| Set parameter so that the initial guess is set to zero (=True) or use last timestep (=False). More... | |
| virtual bool | getZeroInitialGuess () const |
| virtual bool | getEmbedded () const |
| virtual Scalar | getInitTimeStep (const Teuchos::RCP< SolutionHistory< Scalar > > &solutionHistory) const |
Public Member Functions inherited from Tempus::Stepper< Scalar > | |
| virtual void | createSubSteppers (std::vector< Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > > models) |
| void | validExplicitODE (const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &model) const |
| Validate that the model supports explicit ODE evaluation, f(x,t) [=xdot]. More... | |
| void | validSecondOrderExplicitODE (const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &model) const |
| Validate that the model supports explicit second order ODE evaluation, f(x,xdot,t) [=xdotdot]. More... | |
| void | validImplicitODE_DAE (const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &model) const |
| Validate ME supports implicit ODE/DAE evaluation, f(xdot,x,t) [= 0]. More... | |
| void | validSecondOrderODE_DAE (const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &model) const |
| Validate ME supports 2nd order implicit ODE/DAE evaluation, f(xdotdot,xdot,x,t) [= 0]. More... | |
| Teuchos::RCP< Teuchos::ParameterList > | defaultSolverParameters () const |
Overridden from Teuchos::Describable | |
| std::string | description_ |
| Teuchos::RCP< const RKButcherTableau< Scalar > > | explicitTableau_ |
| Teuchos::RCP< const RKButcherTableau< Scalar > > | implicitTableau_ |
| Scalar | order_ |
| Teuchos::RCP< Thyra::VectorBase< Scalar > > | stageX_ |
| std::vector< Teuchos::RCP< Thyra::VectorBase< Scalar > > > | stageF_ |
| std::vector< Teuchos::RCP< Thyra::VectorBase< Scalar > > > | stageG_ |
| Teuchos::RCP< Thyra::VectorBase< Scalar > > | xTilde_ |
| Teuchos::RCP< StepperObserver< Scalar > > | stepperObserver_ |
| Teuchos::RCP< StepperIMEX_RKObserver< Scalar > > | stepperIMEX_RKObserver_ |
| Teuchos::RCP< const Thyra::VectorBase< Scalar > > | initial_guess_ |
| virtual std::string | description () const |
| virtual void | describe (Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel) 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 |
| void | evalExplicitModel (const Teuchos::RCP< const Thyra::VectorBase< Scalar > > &X, Scalar time, Scalar stepSize, Scalar stageNumber, const Teuchos::RCP< Thyra::VectorBase< Scalar > > &F) const |
| StepperIMEX_RK () | |
| Default Constructor – not allowed. More... | |
Additional Inherited Members | |
Protected Attributes inherited from Tempus::StepperImplicit< Scalar > | |
| Teuchos::RCP< Teuchos::ParameterList > | stepperPL_ |
| Teuchos::RCP< WrapperModelEvaluator< Scalar > > | wrapperModel_ |
| Teuchos::RCP< Thyra::NonlinearSolverBase< Scalar > > | solver_ |
| Teuchos::RCP< const Thyra::VectorBase< Scalar > > | initial_guess_ |
Implicit-Explicit Runge-Kutta (IMEX-RK) time stepper.
For the implicit ODE system,
, we need to specialize this in order to separate the explicit, implicit, and temporal terms for the IMEX-RK time stepper,
where
,
is the mass matrix,
is the operator representing the "slow" physics (and is evolved explicitly), and
is the operator representing the "fast" physics (and is evolved implicitly). Additionally, we assume that the mass matrix is invertible, so that
where
, and
. Using Butcher tableaus for the explicit terms
the basic IMEX-RK method for
-stages can be written as
where
and
. For iterative solvers, it is useful to write the stage solutions as
where
Rearranging to solve for the implicit term
We can use this to determine the time derivative at each stage for the implicit solve.
Note that the explicit term,
, is evaluated at the implicit stage time,
. We can form the time derivative
Returning to the governing equation
Recall
and if we define a pseudo time derivative,
we can write
For the case when
, we need the time derivative for the plain explicit case. Thus the stage solution is
and we can simply evaluate
We can then form the time derivative as
but again note that the explicit term,
, is evaluated at the implicit stage time,
.
IMEX-RK Algorithm
The single-timestep algorithm for IMEX-RK using the real time derivative,
, is

do




for 


[Optional]
for
[Optional]The single-timestep algorithm for IMEX-RK using the pseudo time derivative,
, is (which is currently implemented)

do




for 


[Optional]
for
[Optional]The following table contains the pre-coded IMEX-RK tableaus.
| Name | Order | Implicit Tableau | Explicit Tableau |
|---|---|---|---|
| IMEX RK 1st order | 1st |
|
|
IMEX RK SSP2 | 2nd |
|
|
IMEX RK ARS 233 | 3rd |
|
|
Definition at line 230 of file Tempus_StepperIMEX_RK_decl.hpp.
| Tempus::StepperIMEX_RK< Scalar >::StepperIMEX_RK | ( | const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > & | appModel, |
| std::string | stepperType = "IMEX RK SSP2" |
||
| ) |
Constructor to use default Stepper parameters.
Definition at line 28 of file Tempus_StepperIMEX_RK_impl.hpp.
| Tempus::StepperIMEX_RK< Scalar >::StepperIMEX_RK | ( | const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > & | appModel, |
| Teuchos::RCP< Teuchos::ParameterList > | pList | ||
| ) |
Constructor to specialize Stepper parameters.
Definition at line 40 of file Tempus_StepperIMEX_RK_impl.hpp.
| Tempus::StepperIMEX_RK< Scalar >::StepperIMEX_RK | ( | const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > & | models, |
| std::string | stepperType, | ||
| Teuchos::RCP< Teuchos::ParameterList > | pList | ||
| ) |
Constructor for StepperFactory.
Definition at line 52 of file Tempus_StepperIMEX_RK_impl.hpp.
|
private |
Default Constructor – not allowed.
|
virtual |
Definition at line 613 of file Tempus_StepperIMEX_RK_impl.hpp.
|
virtual |
Definition at line 606 of file Tempus_StepperIMEX_RK_impl.hpp.
| void Tempus::StepperIMEX_RK< Scalar >::evalExplicitModel | ( | const Teuchos::RCP< const Thyra::VectorBase< Scalar > > & | X, |
| Scalar | time, | ||
| Scalar | stepSize, | ||
| Scalar | stageNumber, | ||
| const Teuchos::RCP< Thyra::VectorBase< Scalar > > & | F | ||
| ) | const |
Definition at line 426 of file Tempus_StepperIMEX_RK_impl.hpp.
| void Tempus::StepperIMEX_RK< Scalar >::evalImplicitModelExplicitly | ( | const Teuchos::RCP< const Thyra::VectorBase< Scalar > > & | X, |
| Scalar | time, | ||
| Scalar | stepSize, | ||
| Scalar | stageNumber, | ||
| const Teuchos::RCP< Thyra::VectorBase< Scalar > > & | G | ||
| ) | const |
Definition at line 394 of file Tempus_StepperIMEX_RK_impl.hpp.
|
virtual |
Implements Tempus::Stepper< Scalar >.
Definition at line 657 of file Tempus_StepperIMEX_RK_impl.hpp.
|
virtual |
Provide a StepperState to the SolutionState. This Stepper does not have any special state data, so just provide the base class StepperState with the Stepper description. This can be checked to ensure that the input StepperState can be used by this Stepper.
Implements Tempus::Stepper< Scalar >.
Definition at line 597 of file Tempus_StepperIMEX_RK_impl.hpp.
|
inlinevirtual |
Reimplemented from Tempus::StepperImplicit< Scalar >.
Definition at line 274 of file Tempus_StepperIMEX_RK_decl.hpp.
| Teuchos::RCP< Teuchos::ParameterList > Tempus::StepperIMEX_RK< Scalar >::getNonconstParameterList | ( | ) |
Definition at line 672 of file Tempus_StepperIMEX_RK_impl.hpp.
|
inlinevirtual |
Implements Tempus::Stepper< Scalar >.
Definition at line 299 of file Tempus_StepperIMEX_RK_decl.hpp.
|
inlinevirtual |
Implements Tempus::Stepper< Scalar >.
Definition at line 301 of file Tempus_StepperIMEX_RK_decl.hpp.
|
inlinevirtual |
Implements Tempus::Stepper< Scalar >.
Definition at line 300 of file Tempus_StepperIMEX_RK_decl.hpp.
| Teuchos::RCP< const Teuchos::ParameterList > Tempus::StepperIMEX_RK< Scalar >::getValidParameters | ( | ) | const |
Definition at line 643 of file Tempus_StepperIMEX_RK_impl.hpp.
|
virtual |
Initialize during construction and after changing input parameters.
Implements Tempus::Stepper< Scalar >.
Definition at line 359 of file Tempus_StepperIMEX_RK_impl.hpp.
|
inlinevirtual |
Implements Tempus::Stepper< Scalar >.
Definition at line 303 of file Tempus_StepperIMEX_RK_decl.hpp.
|
inlinevirtual |
Implements Tempus::Stepper< Scalar >.
Definition at line 305 of file Tempus_StepperIMEX_RK_decl.hpp.
|
inlinevirtual |
Implements Tempus::Stepper< Scalar >.
Definition at line 304 of file Tempus_StepperIMEX_RK_decl.hpp.
|
inlinevirtual |
Implements Tempus::Stepper< Scalar >.
Definition at line 308 of file Tempus_StepperIMEX_RK_decl.hpp.
|
inlinevirtual |
Implements Tempus::Stepper< Scalar >.
Definition at line 307 of file Tempus_StepperIMEX_RK_decl.hpp.
|
virtual |
Set the explicit tableau from ParameterList.
Definition at line 217 of file Tempus_StepperIMEX_RK_impl.hpp.
|
virtual |
Set the explicit tableau from tableau.
Definition at line 230 of file Tempus_StepperIMEX_RK_impl.hpp.
|
virtual |
Set the implicit tableau from ParameterList.
Definition at line 242 of file Tempus_StepperIMEX_RK_impl.hpp.
|
virtual |
Set the implicit tableau from tableau.
Definition at line 258 of file Tempus_StepperIMEX_RK_impl.hpp.
|
inlinevirtual |
Pass initial guess to Newton solver (only relevant for implicit solvers)
Reimplemented from Tempus::StepperImplicit< Scalar >.
Definition at line 291 of file Tempus_StepperIMEX_RK_decl.hpp.
|
virtual |
Reimplemented from Tempus::StepperImplicit< Scalar >.
Definition at line 269 of file Tempus_StepperIMEX_RK_impl.hpp.
|
virtual |
Create WrapperModelPairIMEX from explicit/implicit ModelEvaluators.
Use the supplied explicit/implicit MEs to create a WrapperModelPairIMEX with basic IMEX interactions between explicit and implicit MEs.
Definition at line 324 of file Tempus_StepperIMEX_RK_impl.hpp.
|
virtual |
Create WrapperModelPairIMEX from user-supplied ModelEvaluator pair.
The user-supplied ME pair can contain any user-specific IMEX interactions between explicit and implicit MEs.
Definition at line 296 of file Tempus_StepperIMEX_RK_impl.hpp.
|
virtual |
Set Observer.
Implements Tempus::Stepper< Scalar >.
Definition at line 337 of file Tempus_StepperIMEX_RK_impl.hpp.
| void Tempus::StepperIMEX_RK< Scalar >::setParameterList | ( | const Teuchos::RCP< Teuchos::ParameterList > & | pl | ) |
Definition at line 627 of file Tempus_StepperIMEX_RK_impl.hpp.
|
virtual |
Set both the explicit and implicit tableau from ParameterList.
Definition at line 65 of file Tempus_StepperIMEX_RK_impl.hpp.
|
virtual |
Take the specified timestep, dt, and return true if successful.
Implements Tempus::Stepper< Scalar >.
Definition at line 461 of file Tempus_StepperIMEX_RK_impl.hpp.
| Teuchos::RCP< Teuchos::ParameterList > Tempus::StepperIMEX_RK< Scalar >::unsetParameterList | ( | ) |
Definition at line 680 of file Tempus_StepperIMEX_RK_impl.hpp.
|
protected |
Definition at line 344 of file Tempus_StepperIMEX_RK_decl.hpp.
|
protected |
Definition at line 346 of file Tempus_StepperIMEX_RK_decl.hpp.
|
protected |
Definition at line 347 of file Tempus_StepperIMEX_RK_decl.hpp.
|
protected |
Definition at line 359 of file Tempus_StepperIMEX_RK_decl.hpp.
|
protected |
Definition at line 349 of file Tempus_StepperIMEX_RK_decl.hpp.
|
protected |
Definition at line 352 of file Tempus_StepperIMEX_RK_decl.hpp.
|
protected |
Definition at line 353 of file Tempus_StepperIMEX_RK_decl.hpp.
|
protected |
Definition at line 351 of file Tempus_StepperIMEX_RK_decl.hpp.
|
protected |
Definition at line 358 of file Tempus_StepperIMEX_RK_decl.hpp.
|
protected |
Definition at line 357 of file Tempus_StepperIMEX_RK_decl.hpp.
|
protected |
Definition at line 355 of file Tempus_StepperIMEX_RK_decl.hpp.