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"
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  * - Constructs with a default ParameterList.
235  * - Can reset ParameterList with setParameterList().
236  * - Requires subsequent setModel() and initialize() calls before calling
237  * takeStep().
238  */
239  StepperIMEX_RK();
240 
241  /// Constructor to specialize Stepper parameters.
243  const Teuchos::RCP<const Thyra::ModelEvaluator<Scalar> >& appModel,
244  Teuchos::RCP<Teuchos::ParameterList> pList);
245 
246  /// Constructor to use default Stepper parameters.
248  const Teuchos::RCP<const Thyra::ModelEvaluator<Scalar> >& appModel,
249  std::string stepperType = "IMEX RK SSP2");
250 
251  /// Constructor for StepperFactory.
253  const Teuchos::RCP<const Thyra::ModelEvaluator<Scalar> >& models,
254  std::string stepperType, Teuchos::RCP<Teuchos::ParameterList> pList);
255 
256  /// \name Basic stepper methods
257  //@{
258  /// Set both the explicit and implicit tableau from ParameterList
259  virtual void setTableaus(Teuchos::RCP<Teuchos::ParameterList> pList,
260  std::string stepperType = "");
261 
262  /// Set the explicit tableau from ParameterList
263  virtual void setExplicitTableau(std::string stepperType,
264  Teuchos::RCP<Teuchos::ParameterList> pList);
265 
266  /// Set the explicit tableau from tableau
267  virtual void setExplicitTableau(
268  Teuchos::RCP<const RKButcherTableau<Scalar> > explicitTableau);
269 
270  /// Set the implicit tableau from ParameterList
271  virtual void setImplicitTableau(std::string stepperType,
272  Teuchos::RCP<Teuchos::ParameterList> pList);
273 
274  /// Set the implicit tableau from tableau
275  virtual void setImplicitTableau(
276  Teuchos::RCP<const RKButcherTableau<Scalar> > implicitTableau);
277 
278  virtual void setModel(
279  const Teuchos::RCP<const Thyra::ModelEvaluator<Scalar> >& appModel);
280 
281  virtual Teuchos::RCP<const Thyra::ModelEvaluator<Scalar> > getModel()
282  { return this->wrapperModel_; }
283 
284  virtual void setModelPair(
285  const Teuchos::RCP<WrapperModelEvaluatorPairIMEX_Basic<Scalar> >& mePair);
286 
287  virtual void setModelPair(
288  const Teuchos::RCP<const Thyra::ModelEvaluator<Scalar> >& explicitModel,
289  const Teuchos::RCP<const Thyra::ModelEvaluator<Scalar> >& implicitModel);
290 
291  virtual void setObserver(
292  Teuchos::RCP<StepperObserver<Scalar> > obs = Teuchos::null);
293 
294  /// Initialize during construction and after changing input parameters.
295  virtual void initialize();
296 
297  /// Set the initial conditions and make them consistent.
298  virtual void setInitialConditions (
299  const Teuchos::RCP<SolutionHistory<Scalar> >& solutionHistory);
300 
301  /// Take the specified timestep, dt, and return true if successful.
302  virtual void takeStep(
303  const Teuchos::RCP<SolutionHistory<Scalar> >& solutionHistory);
304 
305  virtual Teuchos::RCP<Tempus::StepperState<Scalar> >getDefaultStepperState();
306  virtual Scalar getOrder()const { return order_; }
307  virtual Scalar getOrderMin()const { return order_; }
308  virtual Scalar getOrderMax()const { return order_; }
309 
310  virtual bool isExplicit() const {return true;}
311  virtual bool isImplicit() const {return true;}
312  virtual bool isExplicitImplicit() const
313  {return isExplicit() and isImplicit();}
314  virtual bool isOneStepMethod() const {return true;}
315  virtual bool isMultiStepMethod() const {return !isOneStepMethod();}
316 
317  virtual OrderODE getOrderODE() const {return FIRST_ORDER_ODE;}
318  //@}
319 
320  /// Return alpha = d(xDot)/dx.
321  virtual Scalar getAlpha(const Scalar dt) const
322  {
323  const Teuchos::SerialDenseMatrix<int,Scalar> & A = implicitTableau_->A();
324  return Scalar(1.0)/(dt*A(0,0)); // Getting the first diagonal coeff!
325  }
326  /// Return beta = d(x)/dx.
327  virtual Scalar getBeta (const Scalar ) const { return Scalar(1.0); }
328 
329  /// \name ParameterList methods
330  //@{
331  void setParameterList(const Teuchos::RCP<Teuchos::ParameterList> & pl);
332  Teuchos::RCP<Teuchos::ParameterList> getNonconstParameterList();
333  Teuchos::RCP<Teuchos::ParameterList> unsetParameterList();
334  Teuchos::RCP<const Teuchos::ParameterList> getValidParameters() const;
335  Teuchos::RCP<Teuchos::ParameterList> getDefaultParameters() const;
336  //@}
337 
338  /// \name Overridden from Teuchos::Describable
339  //@{
340  virtual std::string description() const;
341  virtual void describe(Teuchos::FancyOStream & out,
342  const Teuchos::EVerbosityLevel verbLevel) const;
343  //@}
344 
346  const Teuchos::RCP<const Thyra::VectorBase<Scalar> > & X,
347  Scalar time, Scalar stepSize, Scalar stageNumber,
348  const Teuchos::RCP<Thyra::VectorBase<Scalar> > & G) const;
349 
350  void evalExplicitModel(
351  const Teuchos::RCP<const Thyra::VectorBase<Scalar> > & X,
352  Scalar time, Scalar stepSize, Scalar stageNumber,
353  const Teuchos::RCP<Thyra::VectorBase<Scalar> > & F) const;
354 
355 protected:
356 
357  std::string description_;
358 
359  Teuchos::RCP<const RKButcherTableau<Scalar> > explicitTableau_;
360  Teuchos::RCP<const RKButcherTableau<Scalar> > implicitTableau_;
361 
362  Scalar order_;
363 
364  Teuchos::RCP<Thyra::VectorBase<Scalar> > stageX_;
365  std::vector<Teuchos::RCP<Thyra::VectorBase<Scalar> > > stageF_;
366  std::vector<Teuchos::RCP<Thyra::VectorBase<Scalar> > > stageG_;
367 
368  Teuchos::RCP<Thyra::VectorBase<Scalar> > xTilde_;
369 
370  Teuchos::RCP<StepperIMEX_RKObserver<Scalar> > stepperIMEX_RKObserver_;
371 
372 };
373 
374 
375 /** \brief Time-derivative interface for IMEX RK.
376  *
377  * Given the stage state \f$X_i\f$ and
378  * \f[
379  * \tilde{X} = x_{n-1} +\Delta t \sum_{j=1}^{i-1} a_{ij}\,\dot{X}_{j},
380  * \f]
381  * compute the IMEX RK stage time-derivative,
382  * \f[
383  * \dot{X}_i = \frac{X_{i} - \tilde{X}}{a_{ii} \Delta t}
384  * \f]
385  * \f$\ddot{x}\f$ is not used and set to null.
386  */
387 template <typename Scalar>
389  : virtual public Tempus::TimeDerivative<Scalar>
390 {
391 public:
392 
393  /// Constructor
395  Scalar s, Teuchos::RCP<const Thyra::VectorBase<Scalar> > xTilde)
396  { initialize(s, xTilde); }
397 
398  /// Destructor
400 
401  /// Compute the time derivative.
402  virtual void compute(
403  Teuchos::RCP<const Thyra::VectorBase<Scalar> > x,
404  Teuchos::RCP< Thyra::VectorBase<Scalar> > xDot,
405  Teuchos::RCP< Thyra::VectorBase<Scalar> > xDotDot = Teuchos::null)
406  {
407  xDotDot = Teuchos::null;
408 
409  // ith stage
410  // s = 1/(dt*a_ii)
411  // xOld = solution at beginning of time step
412  // xTilde = xOld + dt*(Sum_{j=1}^{i-1} a_ij x_dot_j)
413  // xDotTilde = - (s*x_i - s*xTilde)
414  Thyra::V_StVpStV(xDot.ptr(),s_,*x,-s_,*xTilde_);
415  }
416 
417  virtual void initialize(Scalar s,
418  Teuchos::RCP<const Thyra::VectorBase<Scalar> > xTilde)
419  { s_ = s; xTilde_ = xTilde; }
420 
421 private:
422 
423  Teuchos::RCP<const Thyra::VectorBase<Scalar> > xTilde_;
424  Scalar s_; // = 1/(dt*a_ii)
425 };
426 
427 
428 } // namespace Tempus
429 #endif // Tempus_StepperIMEX_RK_decl_hpp
virtual void describe(Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel) const
virtual Scalar getOrder() const
Teuchos::RCP< WrapperModelEvaluator< Scalar > > wrapperModel_
virtual void setTableaus(Teuchos::RCP< Teuchos::ParameterList > pList, std::string stepperType="")
Set both the explicit and implicit tableau from ParameterList.
virtual std::string description() const
Teuchos::RCP< const Teuchos::ParameterList > getValidParameters() const
ModelEvaluator pair for implicit and explicit (IMEX) evaulations.
Implicit-Explicit Runge-Kutta (IMEX-RK) time stepper.
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_
Teuchos::RCP< StepperIMEX_RKObserver< Scalar > > stepperIMEX_RKObserver_
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.
Teuchos::RCP< Teuchos::ParameterList > unsetParameterList()
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
void setParameterList(const Teuchos::RCP< Teuchos::ParameterList > &pl)
virtual Scalar getBeta(const Scalar) const
Return beta = d(x)/dx.
Stepper integrates first-order ODEs.
virtual void setExplicitTableau(std::string stepperType, Teuchos::RCP< Teuchos::ParameterList > pList)
Set the explicit tableau from ParameterList.
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_
virtual void setImplicitTableau(std::string stepperType, Teuchos::RCP< Teuchos::ParameterList > pList)
Set the implicit tableau from ParameterList.
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...
Teuchos::RCP< Teuchos::ParameterList > getDefaultParameters() const
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.
Teuchos::RCP< Teuchos::ParameterList > getNonconstParameterList()