Tempus Version of the Day
Time Integration
Loading...
Searching...
No Matches
Public Member Functions | List of all members
Tempus::StepperIMEX_RK_Partition< Scalar > Class Template Reference

Partitioned Implicit-Explicit Runge-Kutta (IMEX-RK) time stepper. More...

#include <Tempus_StepperIMEX_RK_Partition_decl.hpp>

Inheritance diagram for Tempus::StepperIMEX_RK_Partition< Scalar >:
Tempus::StepperImplicit< Scalar > Tempus::StepperRKBase< Scalar > Tempus::Stepper< Scalar > Tempus::Stepper< Scalar >

Public Member Functions

 StepperIMEX_RK_Partition (std::string stepperType="Partitioned IMEX RK SSP2")
 Default constructor.
 
 StepperIMEX_RK_Partition (const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &appModel, const Teuchos::RCP< Thyra::NonlinearSolverBase< Scalar > > &solver, bool useFSAL, std::string ICConsistency, bool ICConsistencyCheck, bool zeroInitialGuess, const Teuchos::RCP< StepperRKAppAction< Scalar > > &stepperRKAppAction, std::string stepperType, Teuchos::RCP< const RKButcherTableau< Scalar > > explicitTableau, Teuchos::RCP< const RKButcherTableau< Scalar > > implicitTableau, Scalar order)
 Constructor to for all member data.
 
- Public Member Functions inherited from Tempus::StepperImplicit< Scalar >
Teuchos::RCP< Teuchos::ParameterList > getValidParametersBasicImplicit () const
 
void setStepperImplicitValues (Teuchos::RCP< Teuchos::ParameterList > pl)
 Set StepperImplicit member data from the ParameterList.
 
void setStepperSolverValues (Teuchos::RCP< Teuchos::ParameterList > pl)
 Set solver from ParameterList.
 
void setSolverName (std::string i)
 Set the Solver Name.
 
std::string getSolverName () const
 Get the Solver Name.
 
virtual Teuchos::RCP< const WrapperModelEvaluator< Scalar > > getWrapperModel ()
 
virtual void setDefaultSolver ()
 
virtual void setSolver (Teuchos::RCP< Thyra::NonlinearSolverBase< Scalar > > solver) override
 Set solver.
 
virtual Teuchos::RCP< Thyra::NonlinearSolverBase< Scalar > > getSolver () const override
 Get solver.
 
const Thyra::SolveStatus< Scalar > solveImplicitODE (const Teuchos::RCP< Thyra::VectorBase< Scalar > > &x, const Teuchos::RCP< Thyra::VectorBase< Scalar > > &xDot, const Scalar time, const Teuchos::RCP< ImplicitODEParameters< Scalar > > &p, const Teuchos::RCP< Thyra::VectorBase< Scalar > > &y=Teuchos::null, const int index=0)
 Solve implicit ODE, f(x, xDot, t, p) = 0.
 
void evaluateImplicitODE (Teuchos::RCP< Thyra::VectorBase< Scalar > > &f, const Teuchos::RCP< Thyra::VectorBase< Scalar > > &x, const Teuchos::RCP< Thyra::VectorBase< Scalar > > &xDot, const Scalar time, const Teuchos::RCP< ImplicitODEParameters< Scalar > > &p)
 Evaluate implicit ODE residual, f(x, xDot, t, p).
 
virtual void setInitialGuess (Teuchos::RCP< const Thyra::VectorBase< Scalar > > initialGuess) override
 Pass initial guess to Newton solver (only relevant for implicit solvers)
 
virtual void setZeroInitialGuess (bool zIG)
 Set parameter so that the initial guess is set to zero (=True) or use last timestep (=False).
 
virtual bool getZeroInitialGuess () const
 
virtual Scalar getInitTimeStep (const Teuchos::RCP< SolutionHistory< Scalar > > &) const override
 
- Public Member Functions inherited from Tempus::Stepper< Scalar >
virtual std::string description () const
 
void setStepperValues (const Teuchos::RCP< Teuchos::ParameterList > pl)
 Set Stepper member data from ParameterList.
 
Teuchos::RCP< Teuchos::ParameterList > getValidParametersBasic () const
 Add basic parameters to Steppers ParameterList.
 
virtual bool isInitialized ()
 True if stepper's member data is initialized.
 
virtual void checkInitialized ()
 Check initialization, and error out on failure.
 
void setStepperName (std::string s)
 Set the stepper name.
 
std::string getStepperName () const
 Get the stepper name.
 
std::string getStepperType () const
 Get the stepper type. The stepper type is used as an identifier for the stepper, and can only be set by the derived Stepper class.
 
virtual void setUseFSAL (bool a)
 
void setUseFSALTrueOnly (bool a)
 
void setUseFSALFalseOnly (bool a)
 
bool getUseFSAL () const
 
void setICConsistency (std::string s)
 
std::string getICConsistency () const
 
void setICConsistencyCheck (bool c)
 
bool getICConsistencyCheck () const
 
virtual Teuchos::RCP< Thyra::VectorBase< Scalar > > getStepperX ()
 Get Stepper x.
 
virtual Teuchos::RCP< Thyra::VectorBase< Scalar > > getStepperXDot ()
 Get Stepper xDot.
 
virtual Teuchos::RCP< Thyra::VectorBase< Scalar > > getStepperXDotDot ()
 Get Stepper xDotDot.
 
virtual Teuchos::RCP< Thyra::VectorBase< Scalar > > getStepperXDotDot (Teuchos::RCP< SolutionState< Scalar > > state)
 Get xDotDot from SolutionState or Stepper storage.
 
- Public Member Functions inherited from Tempus::StepperRKBase< Scalar >
virtual Teuchos::RCP< const RKButcherTableau< Scalar > > getTableau () const
 
virtual Scalar getOrder () const
 
virtual Scalar getOrderMin () const
 
virtual Scalar getOrderMax () const
 
virtual int getNumberOfStages () const
 
virtual int getStageNumber () const
 
virtual void setStageNumber (int s)
 
virtual void setUseEmbedded (bool a)
 
virtual bool getUseEmbedded () const
 
virtual void setErrorNorm (const Teuchos::RCP< Stepper_ErrorNorm< Scalar > > &errCalculator=Teuchos::null)
 
virtual void setAppAction (Teuchos::RCP< StepperRKAppAction< Scalar > > appAction)
 
virtual Teuchos::RCP< StepperRKAppAction< Scalar > > getAppAction () const
 
virtual void setStepperRKValues (Teuchos::RCP< Teuchos::ParameterList > pl)
 Set StepperRK member data from the ParameterList.
 
virtual Teuchos::RCP< RKButcherTableau< Scalar > > createTableau (Teuchos::RCP< Teuchos::ParameterList > pl)
 

Overridden from Teuchos::Describable

Teuchos::RCP< const RKButcherTableau< Scalar > > explicitTableau_
 
Teuchos::RCP< const RKButcherTableau< Scalar > > implicitTableau_
 
Scalar order_
 
std::vector< Teuchos::RCP< Thyra::VectorBase< Scalar > > > stageF_
 
std::vector< Teuchos::RCP< Thyra::VectorBase< Scalar > > > stageGx_
 
Teuchos::RCP< Thyra::VectorBase< Scalar > > xTilde_
 
virtual void describe (Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel) const
 
virtual bool isValidSetup (Teuchos::FancyOStream &out) const
 
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
 
void evalExplicitModel (const Teuchos::RCP< const Thyra::VectorBase< Scalar > > &X, Scalar time, Scalar stepSize, Scalar stageNumber, const Teuchos::RCP< Thyra::VectorBase< Scalar > > &F) const
 
void setOrder (Scalar order)
 

Basic stepper methods

virtual Teuchos::RCP< const RKButcherTableau< Scalar > > getTableau () const
 Returns the explicit tableau!
 
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 setTableausPartition (Teuchos::RCP< Teuchos::ParameterList > pl, std::string stepperType)
 
virtual Teuchos::RCP< const RKButcherTableau< Scalar > > getExplicitTableau () const
 Return explicit tableau.
 
virtual void setExplicitTableau (Teuchos::RCP< const RKButcherTableau< Scalar > > explicitTableau)
 Set the explicit tableau from tableau.
 
virtual Teuchos::RCP< const RKButcherTableau< Scalar > > getImplicitTableau () const
 Return implicit tableau.
 
virtual void setImplicitTableau (Teuchos::RCP< const RKButcherTableau< Scalar > > implicitTableau)
 Set the implicit tableau from tableau.
 
virtual void setModel (const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &appModel)
 Set the model.
 
virtual Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > getModel () const
 
virtual void setModelPair (const Teuchos::RCP< WrapperModelEvaluatorPairPartIMEX_Basic< Scalar > > &modelPair)
 Create WrapperModelPairIMEX from user-supplied ModelEvaluator pair.
 
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.
 
virtual void initialize ()
 Initialize during construction and after changing input parameters.
 
virtual void setInitialConditions (const Teuchos::RCP< SolutionHistory< Scalar > > &solutionHistory)
 Set the initial conditions and make them consistent.
 
virtual void takeStep (const Teuchos::RCP< SolutionHistory< Scalar > > &solutionHistory)
 Take the specified timestep, dt, and return true if successful.
 
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.
 
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
 
virtual OrderODE getOrderODE () const
 
std::vector< Teuchos::RCP< Thyra::VectorBase< Scalar > > > & getStageF ()
 
std::vector< Teuchos::RCP< Thyra::VectorBase< Scalar > > > & getStageGx ()
 
Teuchos::RCP< Thyra::VectorBase< Scalar > > & getXTilde ()
 
virtual Scalar getAlpha (const Scalar dt) const
 Return alpha = d(xDot)/dx.
 
virtual Scalar getBeta (const Scalar) const
 Return beta = d(x)/dx.
 
Teuchos::RCP< const Teuchos::ParameterList > getValidParameters () const
 

Additional Inherited Members

- Protected Member Functions inherited from Tempus::Stepper< Scalar >
virtual void setStepperX (Teuchos::RCP< Thyra::VectorBase< Scalar > > x)
 Set x for Stepper storage.
 
virtual void setStepperXDot (Teuchos::RCP< Thyra::VectorBase< Scalar > > xDot)
 Set xDot for Stepper storage.
 
virtual void setStepperXDotDot (Teuchos::RCP< Thyra::VectorBase< Scalar > > xDotDot)
 Set x for Stepper storage.
 
void setStepperType (std::string s)
 Set the stepper type.
 
- Protected Member Functions inherited from Tempus::StepperRKBase< Scalar >
virtual void setEmbeddedMemory ()
 
- Protected Attributes inherited from Tempus::StepperImplicit< Scalar >
Teuchos::RCP< WrapperModelEvaluator< Scalar > > wrapperModel_
 
Teuchos::RCP< Thyra::NonlinearSolverBase< Scalar > > solver_
 
Teuchos::RCP< const Thyra::VectorBase< Scalar > > initialGuess_
 
bool zeroInitialGuess_
 
std::string solverName_
 
- Protected Attributes inherited from Tempus::Stepper< Scalar >
bool useFSAL_ = false
 Use First-Same-As-Last (FSAL) principle.
 
bool isInitialized_ = false
 True if stepper's member data is initialized.
 
- Protected Attributes inherited from Tempus::StepperRKBase< Scalar >
Teuchos::RCP< RKButcherTableau< Scalar > > tableau_
 
bool useEmbedded_
 
Teuchos::RCP< Thyra::VectorBase< Scalar > > ee_
 
Teuchos::RCP< Thyra::VectorBase< Scalar > > abs_u0
 
Teuchos::RCP< Thyra::VectorBase< Scalar > > abs_u
 
Teuchos::RCP< Thyra::VectorBase< Scalar > > sc
 
Teuchos::RCP< Stepper_ErrorNorm< Scalar > > stepperErrorNormCalculator_
 
int stageNumber_
 The current Runge-Kutta stage number, {0,...,s-1}. -1 indicates outside stage loop.
 
Teuchos::RCP< StepperRKAppAction< Scalar > > stepperRKAppAction_
 

Detailed Description

template<class Scalar>
class Tempus::StepperIMEX_RK_Partition< Scalar >

Partitioned Implicit-Explicit Runge-Kutta (IMEX-RK) time stepper.

Partitioned IMEX-RK is similar to the IMEX-RK (StepperIMEX_RK), except a portion of the solution only requires explicit integration, and should not be part of the implicit solution to reduce computational costs. Again our implicit ODE can be written as

\begin{eqnarray*}
  M(z,t)\, \dot{z} + G(z,t) + F(z,t) & = & 0, \\
  \mathcal{G}(\dot{z},z,t) + F(z,t) & = & 0,
\end{eqnarray*}

but now

\[
  z     =\left\{\begin{array}{c} y\\ x \end{array}\right\},\;
  F(z,t)=\left\{\begin{array}{c} F^y(x,y,t)\\ F^x(x,y,t)\end{array}\right\},
  \mbox{ and }
  G(z,t)=\left\{\begin{array}{c} 0\\ G^x(x,y,t) \end{array}\right\}
\]

where $z$ is the product vector of $y$ and $x$, $F(z,t)$ is still the "slow" physics (and evolved explicitly), and $G(z,t)$ is still the "fast" physics (and evolved implicitly), but a portion of the solution vector, $y$, is "explicit-only" and is only evolved by $F^y(x,y,t)$, while $x$ is the Implicit/Explicit (IMEX) solution vector, and is evolved explicitly by $F^x(x,y,t)$ and is evolved implicitly by $G^x(x,y,t)$. Note we can expand this to show all the terms as

\begin{eqnarray*}
  & & M^y(x,y,t)\: \dot{y} + F^y(x,y,t) = 0, \\
  & & M^x(x,y,t)\: \dot{x} + F^x(x,y,t) + G^x(x,y,t) = 0, \\
\end{eqnarray*}

or

\[
     \left\{ \begin{array}{c} \dot{y} \\ \dot{x} \end{array}\right\}
  +  \left\{ \begin{array}{c}    f^y  \\    f^x  \end{array}\right\}
  +  \left\{ \begin{array}{c}     0   \\    g^x  \end{array}\right\} = 0
\]

where

\begin{eqnarray*}
  f^y(x,y,t) & = & M^y(x,y,t)^{-1}\, F^y(x,y,t), \\
  f^x(x,y,t) & = & M^x(x,y,t)^{-1}\, F^x(x,y,t), \\
  g^x(x,y,t) & = & M^x(x,y,t)^{-1}\, G^x(x,y,t),
\end{eqnarray*}

or

\[
  \dot{z} + g(x,y,t) + f(x,y,t) = 0,
\]

where $f(x,y,t) = M(x,y,t)^{-1}\, F(x,y,t)$, and $g(x,y,t) = M(x,y,t)^{-1}\, G(x,y,t)$. Using Butcher tableaus for the explicit and implicit terms

\[ \begin{array}{c|c}
  \hat{c} & \hat{a} \\ \hline
          & \hat{b}^T
\end{array}
\;\;\;\; \mbox{ and } \;\;\;\;
\begin{array}{c|c}
  c & a \\ \hline
    & b^T
\end{array}, \]

respectively, the basic scheme for this partitioned, $s$-stage, IMEX-RK method is

\[ \begin{array}{rcll}
 Z_i & = & Z_{n-1}
 - \Delta t \sum_{j=1}^{i-1} \hat{a}_{ij}\; f(Z_j,\hat{t}_j)
 - \Delta t \sum_{j=1}^i           a_{ij}\; g(Z_j,     t_j)
   &   \mbox{for } i=1\ldots s, \\
 z_n & = & z_{n-1}
 - \Delta t \sum_{i=1}^s \left[ \hat{b}_i\; f(Z_i,\hat{t}_i)
                               +     b_i\;  g(Z_i,     t_i) \right] &
\end{array} \]

or expanded

\[ \begin{array}{rcll}
 Y_i & = & y_{n-1}
 - \Delta t \sum_{j=1}^{i-1} \hat{a}_{ij}\; f^y(Z_j,\hat{t}_j)
    &   \mbox{for } i=1\ldots s,\\
 X_i & = & x_{n-1}
 - \Delta t \sum_{j=1}^{i-1} \hat{a}_{ij}\; f^x(Z_j,\hat{t}_j)
 - \Delta t \sum_{j=1}^i           a_{ij}\; g^x(Z_j,     t_j)
   &   \mbox{for } i=1\ldots s, \\
 y_n & = & y_{n-1}
 - \Delta t \sum_{i=1}^s \hat{b}_{i}\; f^y(Z_i,\hat{t}_i) & \\
 x_n & = & x_{n-1}
 - \Delta t \sum_{i=1}^s \left[ \hat{b}_i\; f^x(Z_i,\hat{t}_i)
                               +     b_i\;  g^x(Z_i,     t_i) \right] &
\end{array} \]

where $\hat{t}_i = t_{n-1}+\hat{c}_i\Delta t$ and $t_i = t_{n-1}+c_i\Delta t$. Note that the "slow" explicit physics, $f^y(Z_j,\hat{t}_j)$ and $f^x(Z_j,\hat{t}_j)$, is evaluated at the explicit stage time, $\hat{t}_j$, and the "fast" implicit physics, $g^x(Z_j,t_j)$, is evaluated at the implicit stage time, $t_j$. We can write the stage solution, $Z_i$, as

\[
  Z_i = \tilde{Z} - a_{ii} \Delta t\, g(Z_i,t_i)
\]

where

\[
  \tilde{Z} = z_{n-1} - \Delta t \sum_{j=1}^{i-1}
    \left[\hat{a}_{ij}\, f(Z_j,\hat{t}_j) + a_{ij}\, g(Z_j, t_j)\right]
\]

or in expanded form as

\[
  \left\{ \begin{array}{c}        Y_i \\        X_i  \end{array}\right\} =
  \left\{ \begin{array}{c} \tilde{Y}  \\ \tilde{X}_i \end{array}\right\}
  -  a_{ii} \Delta t
  \left\{ \begin{array}{c}        0   \\ g^x(Z_i,t_i) \end{array}\right\}
\]

where

\begin{eqnarray*}
  \tilde{Y} & = & y_{n-1} - \Delta t \sum_{j=1}^{i-1}
    \left[\hat{a}_{ij}\, f^y(Z_j,\hat{t}_j)\right] \\
  \tilde{X} & = & x_{n-1} - \Delta t \sum_{j=1}^{i-1}
    \left[\hat{a}_{ij}\, f^x(Z_j,\hat{t}_j) +a_{ij}\, g^x(Z_j,t_j)\right] \\
\end{eqnarray*}

and note that $Y_i = \tilde{Y}$.

Noting that we will be solving the implicit ODE for $\dot{X}_i$, we can write

\[
  \mathcal{G}^x(\tilde{\dot{X}},X_i,Y_i,t_i) =
    \tilde{\dot{X}} + g^x(X_i,Y_i,t_i) = 0
\]

where we have defined a pseudo time derivative, $\tilde{\dot{X}}$,

\[
  \tilde{\dot{X}} \equiv \frac{X_i - \tilde{X}}{a_{ii} \Delta t}
  \quad \quad \left[ = -g^x(X_i,Y_i,t_i)\right]
\]

that can be used with the implicit solve but is not the stage time derivative for the IMEX equations, $\dot{X}_i$. (Note that $\tilde{\dot{X}}$ can be interpreted as the rate of change of the solution due to the implicit "fast" physics.) Note that we are solving for $X_i$, and $Y_i$ are included as parameters possibly needed in the IMEX equations.

To obtain the stage time derivative, $\dot{Z}_i$, for the entire system, we can evaluate the governing equation at the implicit stage time, $t_i$,

\[
  \dot{Z}_i(Z_i,t_i) + f(Z_i,t_i) + g(Z_i,t_i) = 0
\]

The above time derivative, $\dot{Z}_i$, is likely not the same as the real time derivative, $\dot{x}(x(t_i), y(t_i), t_i)$, unless $\hat{c}_i = c_i \rightarrow \hat{t}_i = t_i$ (Reasoning: $x(t_i) \neq X_i$ and $y(t_i) \neq Y_i$ unless $\hat{t}_i = t_i$). Also note that the explicit term, $f(Z_i,t_i)$, is evaluated at the implicit stage time, $t_i$. Solving for $\dot{Z}_i$, we find

\[
  \dot{Z}(Z_i,t_i) = - g(Z_i,t_i) - f(Z_i,t_i)
\]

Iteration Matrix, $W$. Recalling that the definition of the iteration matrix, $W$, is

\[
  W = \alpha \frac{\partial \mathcal{F}_n}{\partial \dot{x}_n}
    + \beta  \frac{\partial \mathcal{F}_n}{\partial x_n},
\]

where $ \alpha \equiv \frac{\partial \dot{x}_n(x_n) }{\partial x_n}, $ and $ \beta \equiv \frac{\partial x_n}{\partial x_n} = 1$. For the IMEX equations, we are solving

\[
  \mathcal{G}^x(\tilde{\dot{X}},X_i,Y_i,t_i) =
    \tilde{\dot{X}} + g^x(X_i,Y_i,t_i) = 0
\]

where $\mathcal{F}_n \rightarrow \mathcal{G}^x$, $x_n \rightarrow X_{i}$, and $\dot{x}_n(x_n) \rightarrow \tilde{\dot{X}}(X_{i})$. The time derivative for the implicit solves is

\[
  \tilde{\dot{X}} \equiv \frac{X_i - \tilde{X}}{a_{ii} \Delta t}
\]

and we can determine that $ \alpha = \frac{1}{a_{ii} \Delta t} $ and $ \beta = 1 $, and therefore write

\[
  W = \frac{1}{a_{ii} \Delta t}
      \frac{\partial \mathcal{G}^x}{\partial \tilde{\dot{X}}}
    + \frac{\partial \mathcal{G}^x}{\partial X_i}.
\]

Explicit Stage in the Implicit Tableau. For general DIRK methods, we need to also handle the case when $a_{ii}=0$. The IMEX stage values can be simply evaluated similiar to the "explicit-only" stage values, e.g.,

\[
   X_i = \tilde{X} = x_{n-1} - \Delta t \sum_{j=1}^{i-1}
    \left[\hat{a}_{ij}\, f^x(Z_j,\hat{t}_j) +a_{ij}\, g^x(Z_j,t_j)\right]
\]

and the time derivative of the stage solution is

\[
  \dot{X}_i = - g^x(X_i,Y_i,t_i) - f^x(X_i,Y_i,t_i)
\]

but again note that the explicit term, $f^x(X_i,Y_i,t_i)$, is evaluated at the implicit stage time, $t_i$.

Algorithm The single-timestep algorithm for the partitioned IMEX-RK is

\begin{center}
  \parbox{5in}{
  \rule{5in}{0.4pt} \\
  {\bf Algorithm} Partitioned IMEX-RK \\
  \rule{5in}{0.4pt} \vspace{-15pt}
  \begin{enumerate}
    \setlength{\itemsep}{0pt} \setlength{\parskip}{0pt} \setlength{\parsep}{0pt}
    \item $Z \leftarrow z_{n-1}$
          \hfill {\it * Recall $Z_i = \{Y_i,X_i\}^T$}
    \item {\it appAction.execute(solutionHistory, stepper, BEGIN\_STEP)}
    \item {\bf for ($i = 0 \ldots s-1$)}
    \item \quad  $Y_i = y_{n-1} -\Delta t \sum_{j=1}^{i-1} \hat{a}_{ij}\;f^y_j$
    \item \quad  $\tilde{X} \leftarrow x_{n-1} - \Delta t\,\sum_{j=1}^{i-1} \left[
                                     \hat{a}_{ij}\, f^x_j + a_{ij}\, g^x_j \right]$
    \item \quad  {\it appAction.execute(solutionHistory, stepper, BEGIN\_STAGE)}
    \item \quad  \hfill {\bf Implicit Tableau}
    \item \quad  {\bf if ($a_{ii} = 0$) then}
    \item \qquad    $X_i   \leftarrow \tilde{X}$
    \item \qquad    {\bf if ($a_{k,i} = 0 \;\forall k = (i+1,\ldots, s-1)$, $b(i) = 0$, $b^\ast(i) = 0$) then}
    \item \qquad \quad  $g^x_i \leftarrow 0$
                        \hfill {\it * Not needed for later calculations.}
    \item \qquad    {\bf else}
    \item \qquad \quad  $g^x_i \leftarrow g^x(X_i,Y_i,t_i)$
    \item \qquad    {\bf endif}
    \item \quad  {\bf else}
    \item \qquad  {\it appAction.execute(solutionHistory, stepper, BEFORE\_SOLVE)}
    \item \qquad  {\bf if (``Zero initial guess.'') then}
    \item \qquad \quad   $X \leftarrow 0$
                         \hfill {\it * Else use previous stage value as initial guess.}
    \item \qquad  {\bf endif}
    \item \qquad  {\bf Solve $\mathcal{G}^x\left(\tilde{\dot{X}}
                        = \frac{X-\tilde{X}}{a_{ii} \Delta t},X,Y,t_i\right) = 0$
                          for $X$ where $Y$ is known.}
    \item \qquad   {\it appAction.execute(solutionHistory, stepper, AFTER\_SOLVE)}
    \item \qquad   $\tilde{\dot{X}} \leftarrow \frac{X - \tilde{X}}{a_{ii} \Delta t}$
    \item \qquad   $g_i \leftarrow - \tilde{\dot{X}}$
    \item \quad  {\bf endif}
    \item \quad  \hfill {\bf Explicit Tableau}
    \item \quad  {\it appAction.execute(solutionHistory, stepper, BEFORE\_EXPLICIT\_EVAL)}
    \item \quad  $f_i \leftarrow M(X,\hat{t}_i)^{-1}\, F(X,\hat{t}_i)$
    \item \quad  $\dot{Z} \leftarrow - g(Z_i,t_i) - f(Z_i,t_i)$ [Optionally]
    \item \quad  {\it appAction.execute(solutionHistory, stepper, END\_STAGE)}
    \item {\bf end for}
    \item $z_n = z_{n-1} - \Delta t\,\sum_{i=1}^{s}\hat{b}_i\, f_i$
    \item $x_n \mathrel{+{=}} - \Delta t\,\sum_{i=1}^{s} b_i\, g^x_i$
    \item {\it appAction.execute(solutionHistory, stepper, END\_STEP)}
  \end{enumerate}
  \vspace{-10pt} \rule{5in}{0.4pt}
  }
\end{center}

The following table contains the pre-coded IMEX-RK tableaus.

Partitioned IMEX-RK Tableaus
Name Order Implicit Tableau Explicit Tableau
Partitioned IMEX RK 1st order 1st

\[ \begin{array}{c|cc}
           0 & 0 & 0 \\
           1 & 0 & 1 \\ \hline
             & 0 & 1
         \end{array} \]

\[ \begin{array}{c|cc}
           0 & 0 & 0 \\
           1 & 1 & 0 \\ \hline
             & 1 & 0
         \end{array} \]

Partitioned IMEX RK SSP2
$\gamma = 1-1/\sqrt{2}$
2nd

\[ \begin{array}{c|cc}
           \gamma   & \gamma & 0 \\
           1-\gamma & 1-2\gamma & \gamma \\ \hline
                    & 1/2       & 1/2
         \end{array} \]

\[ \begin{array}{c|cc}
           0 & 0   & 0 \\
           1 & 1   & 0 \\ \hline
             & 1/2 & 1/2
         \end{array} \]

Partitioned IMEX RK ARS 233
$\gamma = (3+\sqrt{3})/6$
3rd

\[ \begin{array}{c|ccc}
           0        & 0      & 0         & 0      \\
           \gamma   & 0      & \gamma    & 0      \\
           1-\gamma & 0      & 1-2\gamma & \gamma \\ \hline
                    & 0      & 1/2       & 1/2
         \end{array} \]

\[ \begin{array}{c|ccc}
           0        & 0        & 0         & 0 \\
           \gamma   & \gamma   & 0         & 0 \\
           1-\gamma & \gamma-1 & 2-2\gamma & 0 \\ \hline
                    & 0        & 1/2       & 1/2
         \end{array} \]

The First-Same-As-Last (FSAL) principle is not valid for IMEX RK Partition. The default is to set useFSAL=false, and useFSAL=true will result in a warning.

References

  1. Shadid, Cyr, Pawlowski, Widley, Scovazzi, Zeng, Phillips, Conde, Chuadhry, Hensinger, Fischer, Robinson, Rider, Niederhaus, Sanchez, "Towards an IMEX Monolithic ALE Method with Integrated UQ for Multiphysics Shock-hydro", SAND2016-11353, 2016, pp. 21-28.
  2. Cyr, "IMEX Lagrangian Methods", SAND2015-3745C.

Definition at line 320 of file Tempus_StepperIMEX_RK_Partition_decl.hpp.

Constructor & Destructor Documentation

◆ StepperIMEX_RK_Partition() [1/2]

template<class Scalar >
Tempus::StepperIMEX_RK_Partition< Scalar >::StepperIMEX_RK_Partition ( std::string  stepperType = "Partitioned IMEX RK SSP2")

Default constructor.

Requires subsequent setModel(), setSolver() and initialize() calls before calling takeStep().

Definition at line 22 of file Tempus_StepperIMEX_RK_Partition_impl.hpp.

◆ StepperIMEX_RK_Partition() [2/2]

template<class Scalar >
Tempus::StepperIMEX_RK_Partition< Scalar >::StepperIMEX_RK_Partition ( const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &  appModel,
const Teuchos::RCP< Thyra::NonlinearSolverBase< Scalar > > &  solver,
bool  useFSAL,
std::string  ICConsistency,
bool  ICConsistencyCheck,
bool  zeroInitialGuess,
const Teuchos::RCP< StepperRKAppAction< Scalar > > &  stepperRKAppAction,
std::string  stepperType,
Teuchos::RCP< const RKButcherTableau< Scalar > >  explicitTableau,
Teuchos::RCP< const RKButcherTableau< Scalar > >  implicitTableau,
Scalar  order 
)

Constructor to for all member data.

Definition at line 52 of file Tempus_StepperIMEX_RK_Partition_impl.hpp.

Member Function Documentation

◆ getTableau()

template<class Scalar >
virtual Teuchos::RCP< const RKButcherTableau< Scalar > > Tempus::StepperIMEX_RK_Partition< Scalar >::getTableau ( ) const
inlinevirtual

Returns the explicit tableau!

Reimplemented from Tempus::StepperRKBase< Scalar >.

Definition at line 349 of file Tempus_StepperIMEX_RK_Partition_decl.hpp.

◆ setTableaus()

template<class Scalar >
void Tempus::StepperIMEX_RK_Partition< Scalar >::setTableaus ( std::string  stepperType = "",
Teuchos::RCP< const RKButcherTableau< Scalar > >  explicitTableau = Teuchos::null,
Teuchos::RCP< const RKButcherTableau< Scalar > >  implicitTableau = Teuchos::null 
)
virtual

Set both the explicit and implicit tableau from ParameterList.

Definition at line 104 of file Tempus_StepperIMEX_RK_Partition_impl.hpp.

◆ setTableausPartition()

template<class Scalar >
void Tempus::StepperIMEX_RK_Partition< Scalar >::setTableausPartition ( Teuchos::RCP< Teuchos::ParameterList >  pl,
std::string  stepperType 
)
virtual

Definition at line 302 of file Tempus_StepperIMEX_RK_Partition_impl.hpp.

◆ getExplicitTableau()

template<class Scalar >
virtual Teuchos::RCP< const RKButcherTableau< Scalar > > Tempus::StepperIMEX_RK_Partition< Scalar >::getExplicitTableau ( ) const
inlinevirtual

Return explicit tableau.

Definition at line 362 of file Tempus_StepperIMEX_RK_Partition_decl.hpp.

◆ setExplicitTableau()

template<class Scalar >
void Tempus::StepperIMEX_RK_Partition< Scalar >::setExplicitTableau ( Teuchos::RCP< const RKButcherTableau< Scalar > >  explicitTableau)
virtual

Set the explicit tableau from tableau.

Definition at line 359 of file Tempus_StepperIMEX_RK_Partition_impl.hpp.

◆ getImplicitTableau()

template<class Scalar >
virtual Teuchos::RCP< const RKButcherTableau< Scalar > > Tempus::StepperIMEX_RK_Partition< Scalar >::getImplicitTableau ( ) const
inlinevirtual

Return implicit tableau.

Definition at line 370 of file Tempus_StepperIMEX_RK_Partition_decl.hpp.

◆ setImplicitTableau()

template<class Scalar >
void Tempus::StepperIMEX_RK_Partition< Scalar >::setImplicitTableau ( Teuchos::RCP< const RKButcherTableau< Scalar > >  implicitTableau)
virtual

Set the implicit tableau from tableau.

Definition at line 373 of file Tempus_StepperIMEX_RK_Partition_impl.hpp.

◆ setModel()

template<class Scalar >
void Tempus::StepperIMEX_RK_Partition< Scalar >::setModel ( const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &  appModel)
virtual

Set the model.

Reimplemented from Tempus::StepperImplicit< Scalar >.

Definition at line 386 of file Tempus_StepperIMEX_RK_Partition_impl.hpp.

◆ getModel()

template<class Scalar >
virtual Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > Tempus::StepperIMEX_RK_Partition< Scalar >::getModel ( ) const
inlinevirtual

Reimplemented from Tempus::StepperImplicit< Scalar >.

Definition at line 380 of file Tempus_StepperIMEX_RK_Partition_decl.hpp.

◆ setModelPair() [1/2]

template<class Scalar >
void Tempus::StepperIMEX_RK_Partition< Scalar >::setModelPair ( const Teuchos::RCP< WrapperModelEvaluatorPairPartIMEX_Basic< Scalar > > &  mePairIMEX)
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 414 of file Tempus_StepperIMEX_RK_Partition_impl.hpp.

◆ setModelPair() [2/2]

template<class Scalar >
void Tempus::StepperIMEX_RK_Partition< Scalar >::setModelPair ( const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &  explicitModel,
const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &  implicitModel 
)
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 438 of file Tempus_StepperIMEX_RK_Partition_impl.hpp.

◆ initialize()

template<class Scalar >
void Tempus::StepperIMEX_RK_Partition< Scalar >::initialize
virtual

Initialize during construction and after changing input parameters.

Reimplemented from Tempus::Stepper< Scalar >.

Definition at line 453 of file Tempus_StepperIMEX_RK_Partition_impl.hpp.

◆ setInitialConditions()

template<class Scalar >
void Tempus::StepperIMEX_RK_Partition< Scalar >::setInitialConditions ( const Teuchos::RCP< SolutionHistory< Scalar > > &  solutionHistory)
virtual

Set the initial conditions and make them consistent.

Reimplemented from Tempus::StepperImplicit< Scalar >.

Definition at line 486 of file Tempus_StepperIMEX_RK_Partition_impl.hpp.

◆ takeStep()

template<class Scalar >
void Tempus::StepperIMEX_RK_Partition< Scalar >::takeStep ( const Teuchos::RCP< SolutionHistory< Scalar > > &  solutionHistory)
virtual

Take the specified timestep, dt, and return true if successful.

Implements Tempus::Stepper< Scalar >.

Definition at line 605 of file Tempus_StepperIMEX_RK_Partition_impl.hpp.

◆ getDefaultStepperState()

template<class Scalar >
Teuchos::RCP< Tempus::StepperState< Scalar > > Tempus::StepperIMEX_RK_Partition< Scalar >::getDefaultStepperState
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 767 of file Tempus_StepperIMEX_RK_Partition_impl.hpp.

◆ getOrder()

template<class Scalar >
virtual Scalar Tempus::StepperIMEX_RK_Partition< Scalar >::getOrder ( ) const
inlinevirtual

Reimplemented from Tempus::StepperRKBase< Scalar >.

Definition at line 403 of file Tempus_StepperIMEX_RK_Partition_decl.hpp.

◆ getOrderMin()

template<class Scalar >
virtual Scalar Tempus::StepperIMEX_RK_Partition< Scalar >::getOrderMin ( ) const
inlinevirtual

Reimplemented from Tempus::StepperRKBase< Scalar >.

Definition at line 404 of file Tempus_StepperIMEX_RK_Partition_decl.hpp.

◆ getOrderMax()

template<class Scalar >
virtual Scalar Tempus::StepperIMEX_RK_Partition< Scalar >::getOrderMax ( ) const
inlinevirtual

Reimplemented from Tempus::StepperRKBase< Scalar >.

Definition at line 405 of file Tempus_StepperIMEX_RK_Partition_decl.hpp.

◆ isExplicit()

template<class Scalar >
virtual bool Tempus::StepperIMEX_RK_Partition< Scalar >::isExplicit ( ) const
inlinevirtual

◆ isImplicit()

template<class Scalar >
virtual bool Tempus::StepperIMEX_RK_Partition< Scalar >::isImplicit ( ) const
inlinevirtual

◆ isExplicitImplicit()

template<class Scalar >
virtual bool Tempus::StepperIMEX_RK_Partition< Scalar >::isExplicitImplicit ( ) const
inlinevirtual

◆ isOneStepMethod()

template<class Scalar >
virtual bool Tempus::StepperIMEX_RK_Partition< Scalar >::isOneStepMethod ( ) const
inlinevirtual

◆ isMultiStepMethod()

template<class Scalar >
virtual bool Tempus::StepperIMEX_RK_Partition< Scalar >::isMultiStepMethod ( ) const
inlinevirtual

◆ getOrderODE()

template<class Scalar >
virtual OrderODE Tempus::StepperIMEX_RK_Partition< Scalar >::getOrderODE ( ) const
inlinevirtual

◆ getStageF()

template<class Scalar >
std::vector< Teuchos::RCP< Thyra::VectorBase< Scalar > > > & Tempus::StepperIMEX_RK_Partition< Scalar >::getStageF ( )
inline

Definition at line 416 of file Tempus_StepperIMEX_RK_Partition_decl.hpp.

◆ getStageGx()

template<class Scalar >
std::vector< Teuchos::RCP< Thyra::VectorBase< Scalar > > > & Tempus::StepperIMEX_RK_Partition< Scalar >::getStageGx ( )
inline

Definition at line 417 of file Tempus_StepperIMEX_RK_Partition_decl.hpp.

◆ getXTilde()

template<class Scalar >
Teuchos::RCP< Thyra::VectorBase< Scalar > > & Tempus::StepperIMEX_RK_Partition< Scalar >::getXTilde ( )
inline

Definition at line 418 of file Tempus_StepperIMEX_RK_Partition_decl.hpp.

◆ getAlpha()

template<class Scalar >
virtual Scalar Tempus::StepperIMEX_RK_Partition< Scalar >::getAlpha ( const Scalar  dt) const
inlinevirtual

Return alpha = d(xDot)/dx.

Implements Tempus::StepperImplicit< Scalar >.

Definition at line 421 of file Tempus_StepperIMEX_RK_Partition_decl.hpp.

◆ getBeta()

template<class Scalar >
virtual Scalar Tempus::StepperIMEX_RK_Partition< Scalar >::getBeta ( const  Scalar) const
inlinevirtual

Return beta = d(x)/dx.

Implements Tempus::StepperImplicit< Scalar >.

Definition at line 427 of file Tempus_StepperIMEX_RK_Partition_decl.hpp.

◆ getValidParameters()

template<class Scalar >
Teuchos::RCP< const Teuchos::ParameterList > Tempus::StepperIMEX_RK_Partition< Scalar >::getValidParameters
virtual

Reimplemented from Tempus::StepperImplicit< Scalar >.

Definition at line 862 of file Tempus_StepperIMEX_RK_Partition_impl.hpp.

◆ describe()

template<class Scalar >
void Tempus::StepperIMEX_RK_Partition< Scalar >::describe ( Teuchos::FancyOStream &  out,
const Teuchos::EVerbosityLevel  verbLevel 
) const
virtual

Reimplemented from Tempus::StepperImplicit< Scalar >.

Definition at line 777 of file Tempus_StepperIMEX_RK_Partition_impl.hpp.

◆ isValidSetup()

template<class Scalar >
bool Tempus::StepperIMEX_RK_Partition< Scalar >::isValidSetup ( Teuchos::FancyOStream &  out) const
virtual

Reimplemented from Tempus::StepperImplicit< Scalar >.

Definition at line 809 of file Tempus_StepperIMEX_RK_Partition_impl.hpp.

◆ evalImplicitModelExplicitly()

template<typename Scalar >
void Tempus::StepperIMEX_RK_Partition< Scalar >::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

Definition at line 534 of file Tempus_StepperIMEX_RK_Partition_impl.hpp.

◆ evalExplicitModel()

template<typename Scalar >
void Tempus::StepperIMEX_RK_Partition< 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 569 of file Tempus_StepperIMEX_RK_Partition_impl.hpp.

◆ setOrder()

template<class Scalar >
void Tempus::StepperIMEX_RK_Partition< Scalar >::setOrder ( Scalar  order)
inline

Definition at line 450 of file Tempus_StepperIMEX_RK_Partition_decl.hpp.

Member Data Documentation

◆ explicitTableau_

template<class Scalar >
Teuchos::RCP<const RKButcherTableau<Scalar> > Tempus::StepperIMEX_RK_Partition< Scalar >::explicitTableau_
protected

Definition at line 454 of file Tempus_StepperIMEX_RK_Partition_decl.hpp.

◆ implicitTableau_

template<class Scalar >
Teuchos::RCP<const RKButcherTableau<Scalar> > Tempus::StepperIMEX_RK_Partition< Scalar >::implicitTableau_
protected

Definition at line 455 of file Tempus_StepperIMEX_RK_Partition_decl.hpp.

◆ order_

template<class Scalar >
Scalar Tempus::StepperIMEX_RK_Partition< Scalar >::order_
protected

Definition at line 457 of file Tempus_StepperIMEX_RK_Partition_decl.hpp.

◆ stageF_

template<class Scalar >
std::vector<Teuchos::RCP<Thyra::VectorBase<Scalar> > > Tempus::StepperIMEX_RK_Partition< Scalar >::stageF_
protected

Definition at line 459 of file Tempus_StepperIMEX_RK_Partition_decl.hpp.

◆ stageGx_

template<class Scalar >
std::vector<Teuchos::RCP<Thyra::VectorBase<Scalar> > > Tempus::StepperIMEX_RK_Partition< Scalar >::stageGx_
protected

Definition at line 460 of file Tempus_StepperIMEX_RK_Partition_decl.hpp.

◆ xTilde_

template<class Scalar >
Teuchos::RCP<Thyra::VectorBase<Scalar> > Tempus::StepperIMEX_RK_Partition< Scalar >::xTilde_
protected

Definition at line 462 of file Tempus_StepperIMEX_RK_Partition_decl.hpp.


The documentation for this class was generated from the following files: