Tempus  Version of the Day
Time Integration
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Tempus_StepperIMEX_RK_decl.hpp
Go to the documentation of this file.
1 // @HEADER
2 // ****************************************************************************
3 // Tempus: Copyright (2017) Sandia Corporation
4 //
5 // Distributed under BSD 3-clause license (See accompanying file Copyright.txt)
6 // ****************************************************************************
7 // @HEADER
8 
9 #ifndef Tempus_StepperIMEX_RK_decl_hpp
10 #define Tempus_StepperIMEX_RK_decl_hpp
11 
12 #include "Tempus_config.hpp"
14 #include "Tempus_StepperImplicit.hpp"
15 #include "Tempus_WrapperModelEvaluatorPairIMEX_Basic.hpp"
16 #include "Tempus_StepperRKObserverComposite.hpp"
17 
18 
19 namespace Tempus {
20 
21 /** \brief Implicit-Explicit Runge-Kutta (IMEX-RK) time stepper.
22  *
23  * For the implicit ODE system, \f$ \mathcal{F}(\dot{x},x,t) = 0 \f$,
24  * we need to specialize this in order to separate the explicit, implicit,
25  * and temporal terms for the IMEX-RK time stepper,
26  * \f{eqnarray*}{
27  * M(x,t)\, \dot{x}(x,t) + G(x,t) + F(x,t) & = & 0, \\
28  * \mathcal{G}(\dot{x},x,t) + F(x,t) & = & 0,
29  * \f}
30  * where \f$\mathcal{G}(\dot{x},x,t) = M(x,t)\, \dot{x} + G(x,t)\f$,
31  * \f$M(x,t)\f$ is the mass matrix, \f$F(x,t)\f$ is the operator
32  * representing the "slow" physics (and is evolved explicitly), and
33  * \f$G(x,t)\f$ is the operator representing the "fast" physics (and is
34  * evolved implicitly). Additionally, we assume that the mass matrix is
35  * invertible, so that
36  * \f[
37  * \dot{x}(x,t) + g(x,t) + f(x,t) = 0
38  * \f]
39  * where \f$f(x,t) = M(x,t)^{-1}\, F(x,t)\f$, and
40  * \f$g(x,t) = M(x,t)^{-1}\, G(x,t)\f$. Using Butcher tableaus for the
41  * explicit terms
42  * \f[ \begin{array}{c|c}
43  * \hat{c} & \hat{A} \\ \hline
44  * & \hat{b}^T
45  * \end{array}
46  * \;\;\;\; \mbox{ and for implicit terms } \;\;\;\;
47  * \begin{array}{c|c}
48  * c & A \\ \hline
49  * & b^T
50  * \end{array}, \f]
51  * the basic IMEX-RK method for \f$s\f$-stages can be written as
52  * \f[ \begin{array}{rcll}
53  * X_i & = & x_{n-1}
54  * - \Delta t \sum_{j=1}^{i-1} \hat{a}_{ij}\, f(X_j,\hat{t}_j)
55  * - \Delta t \sum_{j=1}^i a_{ij}\, g(X_j,t_j)
56  * & \mbox{for } i=1\ldots s, \\
57  * x_n & = & x_{n-1}
58  * - \Delta t \sum_{i=1}^s \hat{b}_{i}\, f(X_i,\hat{t}_i)
59  * - \Delta t \sum_{i=1}^s b_{i}\, g(X_i,t_i) &
60  * \end{array} \f]
61  * where \f$\hat{t}_i = t_{n-1}+\hat{c}_i\Delta t\f$ and
62  * \f$t_i = t_{n-1}+c_i\Delta t\f$. For iterative solvers, it is useful to
63  * write the stage solutions as
64  * \f[
65  * X_i = \tilde{X} - a_{ii} \Delta t\, g(X_i,t_i)
66  * \f]
67  * where
68  * \f[
69  * \tilde{X} = x_{n-1} - \Delta t \sum_{j=1}^{i-1}
70  * \left(\hat{a}_{ij}\, f(X_j,\hat{t}_j) + a_{ij}\, g(X_j,t_j)\right)
71  * \f]
72  * Rearranging to solve for the implicit term
73  * \f[
74  * g(X_i,t_i) = - \frac{X_i - \tilde{X}}{a_{ii} \Delta t}
75  * \f]
76  * We can use this to determine the time derivative at each stage for the
77  * implicit solve.
78  * \f[
79  * \dot{X}_i(X_i,t_i) + g(X_i,t_i) + f(X_i,t_i) = 0
80  * \f]
81  * Note that the explicit term, \f$f(X_i,t_i)\f$, is evaluated at the implicit
82  * stage time, \f$t_i\f$.
83  * We can form the time derivative
84  * \f{eqnarray*}{
85  * \dot{X}(X_i,t_i) & = & - g(X_i,t_i) - f(X_i,t_i) \\
86  * \dot{X}(X_i,t_i) & = &
87  * \frac{X_i - \tilde{X}}{a_{ii} \Delta t} - f(X_i,t_i) \\
88  * \dot{X}(X_i,t_i) & = &
89  * \frac{X_i - \tilde{X}}{a_{ii} \Delta t} -M(X_i, t_i)^{-1}\, F(X_i,t_i)\\
90  * \f}
91  * Returning to the governing equation
92  * \f{eqnarray*}{
93  * M(X_i,t_i)\, \dot{X}(X_i,t_i) + G(X_i,t_i) + F(X_i,t_i) & = & 0 \\
94  * M(X_i,t_i)\, \left[
95  * \frac{X_i - \tilde{X}}{a_{ii} \Delta t} - M(X_i, t_i)^{-1}\, F(X_i,t_i)
96  * \right] + G(X_i,t_i) + F(X_i,t_i) & = & 0 \\
97  * M(X_i,t_i)\, \left[ \frac{X_i - \tilde{X}}{a_{ii} \Delta t} \right]
98  * + G(X_i,t_i) & = & 0 \\
99  * \f}
100  * Recall \f$\mathcal{G}(\dot{x},x,t) = M(x,t)\, \dot{x} + G(x,t)\f$ and if we
101  * define a pseudo time derivative,
102  * \f[
103  * \tilde{\dot{X}} = \frac{X_i - \tilde{X}}{a_{ii} \Delta t} = - g(X_i,t_i),
104  * \f]
105  * we can write
106  * \f[
107  * \mathcal{G}(\tilde{\dot{X}},X_i,t_i) =
108  * M(X_i,t_i)\, \tilde{\dot{X}} + G(X_i,t_i) = 0
109  * \f]
110  *
111  * For the case when \f$a_{ii}=0\f$, we need the time derivative for the
112  * plain explicit case. Thus the stage solution is
113  * \f[
114  * X_i = x_{n-1} - \Delta t\,\sum_{j=1}^{i-1} \left(
115  * \hat{a}_{ij}\, f_j + a_{ij}\, g_j \right) = \tilde{X}
116  * \f]
117  * and we can simply evaluate
118  * \f{eqnarray*}{
119  * f_i & = & M(X_i,\hat{t}_i)^{-1}\, F(X_i,\hat{t}_i) \\
120  * g_i & = & M(X_i, t_i)^{-1}\, G(X_i, t_i)
121  * \f}
122  * We can then form the time derivative as
123  * \f[
124  * \dot{X}_i(X_i,t_i) = - g(X_i,t_i) - f(X_i,t_i)
125  * \f]
126  * but again note that the explicit term, \f$f(X_i,t_i)\f$, is evaluated
127  * at the implicit stage time, \f$t_i\f$.
128  *
129  * <b> IMEX-RK Algorithm </b>
130  *
131  * The single-timestep algorithm for IMEX-RK using the real time derivative,
132  * \f$\dot{X}(X_i,t_i)\f$, is
133  * - \f$X_1 \leftarrow x_{n-1}\f$
134  * - for \f$i = 1 \ldots s\f$ do
135  * - \f$\tilde{X} \leftarrow x_{n-1} - \Delta t\,\sum_{j=1}^{i-1} \left(
136  * \hat{a}_{ij}\, f_j + a_{ij}\, g_j \right) \f$
137  * - if \f$a_{ii} = 0\f$
138  * - \f$X_i \leftarrow \tilde{X}\f$
139  * - \f$g_i \leftarrow M(X_i, t_i)^{-1}\, G(X_i, t_i)\f$
140  * - else
141  * - Define \f$\dot{X}(X_i,t_i)
142  * = \frac{X_i-\tilde{X}}{a_{ii} \Delta t}
143  * - M(X_i,t_i)^{-1}\, F(X_i,t_i) \f$
144  * - Solve \f$\mathcal{G}\left(\dot{X}(X_i,t_i),X_i,t_i\right)
145  * + F(X_i,t_i) = 0\f$ for \f$X_i\f$
146  * - \f$g_i \leftarrow - \frac{X_i-\tilde{X}}{a_{ii} \Delta t}\f$
147  * - \f$f_i \leftarrow M(X_i,\hat{t}_i)^{-1}\, F(X_i,\hat{t}_i)\f$
148  * - end for
149  * - \f$x_n \leftarrow x_{n-1} - \Delta t\,\sum_{i=1}^{s}\hat{b}_i\,f_i
150  * - \Delta t\,\sum_{i=1}^{s} b_i\,g_i\f$
151  *
152  * The single-timestep algorithm for IMEX-RK using the pseudo time derivative,
153  * \f$\tilde{\dot{X}}\f$, is (which is currently implemented)
154  * - \f$X_1 \leftarrow x_{n-1}\f$
155  * - for \f$i = 1 \ldots s\f$ do
156  * - \f$\tilde{X} \leftarrow x_{n-1} - \Delta t\,\sum_{j=1}^{i-1} \left(
157  * \hat{a}_{ij}\, f_j + a_{ij}\, g_j \right) \f$
158  * - if \f$a_{ii} = 0\f$
159  * - \f$X_i \leftarrow \tilde{X}\f$
160  * - \f$g_i \leftarrow M(X_i, t_i)^{-1}\, G(X_i, t_i)\f$
161  * - else
162  * - Define \f$\tilde{\dot{X}}
163  * = \frac{X_i-\tilde{X}}{a_{ii} \Delta t} \f$
164  * - Solve \f$\mathcal{G}\left(\tilde{\dot{X}},X_i,t_i\right) = 0\f$
165  * for \f$X_i\f$
166  * - \f$g_i \leftarrow - \tilde{\dot{X}}\f$
167  * - \f$f_i \leftarrow M(X_i,\hat{t}_i)^{-1}\, F(X_i,\hat{t}_i)\f$
168  * - end for
169  * - \f$x_n \leftarrow x_{n-1} - \Delta t\,\sum_{i=1}^{s}\hat{b}_i\,f_i
170  * - \Delta t\,\sum_{i=1}^{s} b_i\,g_i\f$
171  *
172  * The following table contains the pre-coded IMEX-RK tableaus.
173  * <table>
174  * <caption id="multi_row">IMEX-RK Tableaus</caption>
175  * <tr><th> Name <th> Order <th> Implicit Tableau <th> Explicit Tableau
176  * <tr><td> IMEX RK 1st order <td> 1st
177  * <td> \f[ \begin{array}{c|cc}
178  * 0 & 0 & 0 \\
179  * 1 & 0 & 1 \\ \hline
180  * & 0 & 1
181  * \end{array} \f]
182  * <td> \f[ \begin{array}{c|cc}
183  * 0 & 0 & 0 \\
184  * 1 & 1 & 0 \\ \hline
185  * & 1 & 0
186  * \end{array} \f]
187  * <tr><td> IMEX RK SSP2\n \f$\gamma = 1-1/\sqrt{2}\f$ <td> 2nd
188  * <td> \f[ \begin{array}{c|cc}
189  * \gamma & \gamma & 0 \\
190  * 1-\gamma & 1-2\gamma & \gamma \\ \hline
191  * & 1/2 & 1/2
192  * \end{array} \f]
193  * <td> \f[ \begin{array}{c|cc}
194  * 0 & 0 & 0 \\
195  * 1 & 1 & 0 \\ \hline
196  * & 1/2 & 1/2
197  * \end{array} \f]
198  * <tr><td> IMEX RK ARS 233\n \f$\gamma = (3+\sqrt{3})/6\f$ <td> 3rd
199  * <td> \f[ \begin{array}{c|ccc}
200  * 0 & 0 & 0 & 0 \\
201  * \gamma & 0 & \gamma & 0 \\
202  * 1-\gamma & 0 & 1-2\gamma & \gamma \\ \hline
203  * & 0 & 1/2 & 1/2
204  * \end{array} \f]
205  * <td> \f[ \begin{array}{c|ccc}
206  * 0 & 0 & 0 & 0 \\
207  * \gamma & \gamma & 0 & 0 \\
208  * 1-\gamma & \gamma-1 & 2-2\gamma & 0 \\ \hline
209  * & 0 & 1/2 & 1/2
210  * \end{array} \f]
211  * </table>
212  *
213  * The First-Step-As-Last (FSAL) principle is not valid for IMEX RK.
214  * The default is to set useFSAL=false, and useFSAL=true will result
215  * in an error.
216  *
217  * #### References
218  * -# Ascher, Ruuth, Spiteri, "Implicit-explicit Runge-Kutta methods for
219  * time-dependent partial differential equations", Applied Numerical
220  * Mathematics 25 (1997) 151-167.
221  * -# Cyr, "IMEX Lagrangian Methods", SAND2015-3745C.
222  * -# Shadid, Cyr, Pawlowski, Widley, Scovazzi, Zeng, Phillips, Conde,
223  * Chuadhry, Hensinger, Fischer, Robinson, Rider, Niederhaus, Sanchez,
224  * "Towards an IMEX Monolithic ALE Method with Integrated UQ for
225  * Multiphysics Shock-hydro", SAND2016-11353, 2016, pp. 21-28.
226  */
227 template<class Scalar>
228 class StepperIMEX_RK : virtual public Tempus::StepperImplicit<Scalar>
229 {
230 public:
231 
232  /** \brief Default constructor.
233  *
234  * Requires subsequent setModel(), setSolver() and initialize()
235  * calls before calling takeStep().
236  */
237  StepperIMEX_RK();
238 
239  /// Constructor to specialize Stepper parameters.
241  const Teuchos::RCP<const Thyra::ModelEvaluator<Scalar> >& appModel,
242  const Teuchos::RCP<StepperObserver<Scalar> >& obs,
243  const Teuchos::RCP<Thyra::NonlinearSolverBase<Scalar> >& solver,
244  bool useFSAL,
245  std::string ICConsistency,
246  bool ICConsistencyCheck,
247  bool zeroInitialGuess,
248  std::string stepperType,
249  Teuchos::RCP<const RKButcherTableau<Scalar> > explicitTableau,
250  Teuchos::RCP<const RKButcherTableau<Scalar> > implicitTableau,
251  Scalar order);
252 
253  /// \name Basic stepper methods
254  //@{
255  /// Set both the explicit and implicit tableau from ParameterList
256  virtual void setTableaus( std::string stepperType = "",
257  Teuchos::RCP<const RKButcherTableau<Scalar> > explicitTableau = Teuchos::null,
258  Teuchos::RCP<const RKButcherTableau<Scalar> > implicitTableau = Teuchos::null);
259 
260  /// Set the explicit tableau from tableau
261  virtual void setExplicitTableau(
262  Teuchos::RCP<const RKButcherTableau<Scalar> > explicitTableau);
263 
264  /// Set the implicit tableau from tableau
265  virtual void setImplicitTableau(
266  Teuchos::RCP<const RKButcherTableau<Scalar> > implicitTableau);
267 
268  virtual void setModel(
269  const Teuchos::RCP<const Thyra::ModelEvaluator<Scalar> >& appModel);
270 
271  virtual Teuchos::RCP<const Thyra::ModelEvaluator<Scalar> > getModel()
272  { return this->wrapperModel_; }
273 
274  virtual void setModelPair(
275  const Teuchos::RCP<WrapperModelEvaluatorPairIMEX_Basic<Scalar> >& mePair);
276 
277  virtual void setModelPair(
278  const Teuchos::RCP<const Thyra::ModelEvaluator<Scalar> >& explicitModel,
279  const Teuchos::RCP<const Thyra::ModelEvaluator<Scalar> >& implicitModel);
280 
281  virtual void setObserver(
282  Teuchos::RCP<StepperObserver<Scalar> > obs = Teuchos::null);
283 
284  virtual Teuchos::RCP<StepperObserver<Scalar> > getObserver() const
285  { return this->stepperObserver_; }
286 
287  /// Initialize during construction and after changing input parameters.
288  virtual void initialize();
289 
290  /// Set the initial conditions and make them consistent.
291  virtual void setInitialConditions (
292  const Teuchos::RCP<SolutionHistory<Scalar> >& solutionHistory);
293 
294  /// Take the specified timestep, dt, and return true if successful.
295  virtual void takeStep(
296  const Teuchos::RCP<SolutionHistory<Scalar> >& solutionHistory);
297 
298  virtual Teuchos::RCP<Tempus::StepperState<Scalar> >getDefaultStepperState();
299  virtual Scalar getOrder()const { return order_; }
300  virtual Scalar getOrderMin()const { return order_; }
301  virtual Scalar getOrderMax()const { return order_; }
302 
303  virtual bool isExplicit() const {return true;}
304  virtual bool isImplicit() const {return true;}
305  virtual bool isExplicitImplicit() const
306  {return isExplicit() and isImplicit();}
307  virtual bool isOneStepMethod() const {return true;}
308  virtual bool isMultiStepMethod() const {return !isOneStepMethod();}
309 
310  virtual OrderODE getOrderODE() const {return FIRST_ORDER_ODE;}
311  //@}
312 
313  /// Return alpha = d(xDot)/dx.
314  virtual Scalar getAlpha(const Scalar dt) const
315  {
316  const Teuchos::SerialDenseMatrix<int,Scalar> & A = implicitTableau_->A();
317  return Scalar(1.0)/(dt*A(0,0)); // Getting the first diagonal coeff!
318  }
319  /// Return beta = d(x)/dx.
320  virtual Scalar getBeta (const Scalar ) const { return Scalar(1.0); }
321 
322  Teuchos::RCP<const Teuchos::ParameterList> getValidParameters() const;
323 
324  /// \name Overridden from Teuchos::Describable
325  //@{
326  virtual void describe(Teuchos::FancyOStream & out,
327  const Teuchos::EVerbosityLevel verbLevel) const;
328  //@}
329 
331  const Teuchos::RCP<const Thyra::VectorBase<Scalar> > & X,
332  Scalar time, Scalar stepSize, Scalar stageNumber,
333  const Teuchos::RCP<Thyra::VectorBase<Scalar> > & G) const;
334 
335  void evalExplicitModel(
336  const Teuchos::RCP<const Thyra::VectorBase<Scalar> > & X,
337  Scalar time, Scalar stepSize, Scalar stageNumber,
338  const Teuchos::RCP<Thyra::VectorBase<Scalar> > & F) const;
339 
340  virtual bool getICConsistencyCheckDefault() const { return false; }
341 
342  void setOrder(Scalar order) { order_ = order; }
343 
344 protected:
345 
346  Teuchos::RCP<const RKButcherTableau<Scalar> > explicitTableau_;
347  Teuchos::RCP<const RKButcherTableau<Scalar> > implicitTableau_;
348 
349  Scalar order_;
350 
351  Teuchos::RCP<Thyra::VectorBase<Scalar> > stageX_;
352  std::vector<Teuchos::RCP<Thyra::VectorBase<Scalar> > > stageF_;
353  std::vector<Teuchos::RCP<Thyra::VectorBase<Scalar> > > stageG_;
354 
355  Teuchos::RCP<Thyra::VectorBase<Scalar> > xTilde_;
356 
357  Teuchos::RCP<StepperRKObserverComposite<Scalar> > stepperObserver_;
358 
359 };
360 
361 
362 /** \brief Time-derivative interface for IMEX RK.
363  *
364  * Given the stage state \f$X_i\f$ and
365  * \f[
366  * \tilde{X} = x_{n-1} +\Delta t \sum_{j=1}^{i-1} a_{ij}\,\dot{X}_{j},
367  * \f]
368  * compute the IMEX RK stage time-derivative,
369  * \f[
370  * \dot{X}_i = \frac{X_{i} - \tilde{X}}{a_{ii} \Delta t}
371  * \f]
372  * \f$\ddot{x}\f$ is not used and set to null.
373  */
374 template <typename Scalar>
376  : virtual public Tempus::TimeDerivative<Scalar>
377 {
378 public:
379 
380  /// Constructor
382  Scalar s, Teuchos::RCP<const Thyra::VectorBase<Scalar> > xTilde)
383  { initialize(s, xTilde); }
384 
385  /// Destructor
387 
388  /// Compute the time derivative.
389  virtual void compute(
390  Teuchos::RCP<const Thyra::VectorBase<Scalar> > x,
391  Teuchos::RCP< Thyra::VectorBase<Scalar> > xDot,
392  Teuchos::RCP< Thyra::VectorBase<Scalar> > xDotDot = Teuchos::null)
393  {
394  xDotDot = Teuchos::null;
395 
396  // ith stage
397  // s = 1/(dt*a_ii)
398  // xOld = solution at beginning of time step
399  // xTilde = xOld + dt*(Sum_{j=1}^{i-1} a_ij x_dot_j)
400  // xDotTilde = - (s*x_i - s*xTilde)
401  Thyra::V_StVpStV(xDot.ptr(),s_,*x,-s_,*xTilde_);
402  }
403 
404  virtual void initialize(Scalar s,
405  Teuchos::RCP<const Thyra::VectorBase<Scalar> > xTilde)
406  { s_ = s; xTilde_ = xTilde; }
407 
408 private:
409 
410  Teuchos::RCP<const Thyra::VectorBase<Scalar> > xTilde_;
411  Scalar s_; // = 1/(dt*a_ii)
412 };
413 
414 
415 } // namespace Tempus
416 #endif // Tempus_StepperIMEX_RK_decl_hpp
virtual void describe(Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel) const
virtual void setImplicitTableau(Teuchos::RCP< const RKButcherTableau< Scalar > > implicitTableau)
Set the implicit tableau from 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.
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 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_
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.
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.
Teuchos::RCP< SolutionHistory< Scalar > > solutionHistory(Teuchos::RCP< Teuchos::ParameterList > pList=Teuchos::null)
Nonmember 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.
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.
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
Teuchos::RCP< Thyra::VectorBase< Scalar > > stageX_
This interface defines the time derivative connection between an implicit Stepper and WrapperModelEva...
virtual bool isOneStepMethod() const
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.