Tempus  Version of the Day
Time Integration
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Tempus_StepperIMEX_RK_Partition_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_Partition_decl_hpp
10 #define Tempus_StepperIMEX_RK_Partition_decl_hpp
11 
12 #include "Tempus_config.hpp"
14 #include "Tempus_StepperImplicit.hpp"
15 #include "Tempus_WrapperModelEvaluatorPairPartIMEX_Basic.hpp"
17 
18 
19 namespace Tempus {
20 
21 /** \brief Partitioned Implicit-Explicit Runge-Kutta (IMEX-RK) time stepper.
22  *
23  * Partitioned IMEX-RK is similar to the IMEX-RK (StepperIMEX_RK),
24  * except a portion of the solution only requires explicit integration,
25  * and should not be part of the implicit solution to reduce computational
26  * costs. Again our ODE can be written as
27  * \f{eqnarray*}{
28  * M(z,t)\, \dot{z} + G(z,t) + F(z,t) & = & 0, \\
29  * \mathcal{G}(\dot{z},z,t) + F(z,t) & = & 0,
30  * \f}
31  * but now
32  * \f[
33  * z =\left\{\begin{array}{c} y\\ x \end{array}\right\},\;
34  * F(z,t)=\left\{\begin{array}{c} F^y(x,y,t)\\ F^x(x,y,t)\end{array}\right\},
35  * \mbox{ and }
36  * G(z,t)=\left\{\begin{array}{c} 0\\ G^x(x,y,t) \end{array}\right\}
37  * \f]
38  * where \f$z\f$ is the product vector of \f$y\f$ and \f$x\f$,
39  * \f$F(z,t)\f$ is still the "slow" physics (and evolved explicitly),
40  * and \f$G(z,t)\f$ is still the "fast" physics (and evolved implicitly),
41  * but a portion of the solution vector, \f$y\f$, is "explicit-only"
42  * and is only evolved by \f$F^y(x,y,t)\f$, while \f$x\f$ is the
43  * Implicit/Explicit (IMEX) solution vector, and is evolved explicitly by
44  * \f$F^x(x,y,t)\f$ evolved implicitly by \f$G^x(x,y,t)\f$.
45  * Note we can expand this to explicitly show all the terms as
46  * \f{eqnarray*}{
47  * & & M^y(x,y,t)\: \dot{y} + F^y(x,y,t) = 0, \\
48  * & & M^x(x,y,t)\: \dot{x} + F^x(x,y,t) + G^x(x,y,t) = 0, \\
49  * \f}
50  * or
51  * \f[
52  * \left\{ \begin{array}{c} \dot{y} \\ \dot{x} \end{array}\right\}
53  * + \left\{ \begin{array}{c} f^y \\ f^x \end{array}\right\}
54  * + \left\{ \begin{array}{c} 0 \\ g^x \end{array}\right\} = 0
55  * \f]
56  * where \f$f^y(x,y,t) = M^y(x,y,t)^{-1}\, F^y(x,y,t)\f$,
57  * \f$f^x(x,y,t) = M^x(x,y,t)^{-1}\, F^x(x,y,t)\f$, and
58  * \f$g^x(x,y,t) = M^x(x,y,t)^{-1}\, G^x(x,y,t)\f$,
59  * or
60  * \f[
61  * \dot{z} + f(x,y,t) + g(x,y,t) = 0,
62  * \f]
63  * where \f$f(x,y,t) = M(x,y,t)^{-1}\, F(x,y,t)\f$, and
64  * \f$g(x,y,t) = M(x,y,t)^{-1}\, G(x,y,t)\f$.
65  * Using Butcher tableaus for the
66  * explicit terms
67  * \f[ \begin{array}{c|c}
68  * \hat{c} & \hat{A} \\ \hline
69  * & \hat{b}^T
70  * \end{array}
71  * \;\;\;\; \mbox{ and for implicit terms } \;\;\;\;
72  * \begin{array}{c|c}
73  * c & A \\ \hline
74  * & b^T
75  * \end{array}, \f]
76  * the basic scheme for this partitioned, \f$s\f$-stage, IMEX-RK is
77  * \f[ \begin{array}{rcll}
78  * Z_i & = & Z_{n-1}
79  * - \Delta t \sum_{j=1}^{i-1} \hat{a}_{ij}\; f(Z_j,\hat{t}_j)
80  * - \Delta t \sum_{j=1}^i a_{ij}\; g(Z_j, t_j)
81  * & \mbox{for } i=1\ldots s, \\
82  * z_n & = & z_{n-1}
83  * - \Delta t \sum_{i=1}^s \left[ \hat{b}_i\; f(Z_i,\hat{t}_i)
84  * + b_i\; g(Z_i, t_i) \right] &
85  * \end{array} \f]
86  * or expanded
87  * \f[ \begin{array}{rcll}
88  * Y_i & = & y_{n-1}
89  * - \Delta t \sum_{j=1}^{i-1} \hat{a}_{ij}\; f^y(Z_j,\hat{t}_j)
90  * & \mbox{for } i=1\ldots s,\\
91  * X_i & = & x_{n-1}
92  * - \Delta t \sum_{j=1}^{i-1} \hat{a}_{ij}\; f^x(Z_j,\hat{t}_j)
93  * - \Delta t \sum_{j=1}^i a_{ij}\; g^x(Z_j, t_j)
94  * & \mbox{for } i=1\ldots s, \\
95  * y_n & = & y_{n-1}
96  * - \Delta t \sum_{i=1}^s \hat{b}_{i}\; f^y(X_i,Y_i,\hat{t}_i) & \\
97  * x_n & = & x_{n-1}
98  * - \Delta t \sum_{i=1}^s \left[ \hat{b}_i\; f^x(Z_i,\hat{t}_i)
99  * + b_i\; g^x(Z_i, t_i) \right] &
100  * \end{array} \f]
101  * where \f$\hat{t}_i = t_{n-1}+\hat{c}_i\Delta t\f$ and
102  * \f$t_i = t_{n-1}+c_i\Delta t\f$.
103  *
104  * For iterative solvers, it is useful to write the stage solutions as
105  * \f[
106  * Z_i = \tilde{Z} - a_{ii} \Delta t\, g(Z_i,t_i)
107  * \f]
108  * or expanded as
109  * \f[
110  * \left\{ \begin{array}{c} Y_i \\ X_i \end{array}\right\} =
111  * \left\{ \begin{array}{c} \tilde{Y} \\ \tilde{X}_i \end{array}\right\}
112  * - a_{ii} \Delta t
113  * \left\{ \begin{array}{c} 0 \\ g^x(Z_i,t_i) \end{array}\right\}
114  * \f]
115  * where
116  * \f{eqnarray*}{
117  * \tilde{Z} & = & z_{n-1} - \Delta t \sum_{j=1}^{i-1}
118  * \left[\hat{a}_{ij}\, f(Z_j,\hat{t}_j) + a_{ij}\, g(Z_j, t_j)\right] \\
119  * \tilde{Y} & = & y_{n-1} - \Delta t \sum_{j=1}^{i-1}
120  * \left[\hat{a}_{ij}\, f^y(Z_j,\hat{t}_j)\right] \\
121  * \tilde{X} & = & x_{n-1} - \Delta t \sum_{j=1}^{i-1}
122  * \left[\hat{a}_{ij}\, f^x(Z_j,\hat{t}_j) +a_{ij}\, g^x(Z_j,t_j)\right] \\
123  * \f}
124  * and note that \f$Y_i = \tilde{Y}\f$. Rearranging to solve for the
125  * implicit term
126  * \f{eqnarray*}{
127  * g (Z_i,t_i) & = & - \frac{Z_i - \tilde{Z}}{a_{ii} \Delta t} \\
128  * g^x(Z_i,t_i) & = & - \frac{X_i - \tilde{X}}{a_{ii} \Delta t}
129  * \f}
130  * We additionally need the time derivative at each stage for the implicit
131  * solve. Let us define the following time derivative for \f$x\f$ portion
132  * of the solution
133  * \f[
134  * \dot{X}_i(X_i,Y_i,t_i) + f^x(X_i,Y_i,t_i) + g^x(X_i,Y_i,t_i) = 0
135  * \f]
136  * where we split \f$Z_i\f$ arguments into \f$X_i\f$ and \f$Y_i\f$ to
137  * emphasize that \f$X_i\f$ is the solution for the implicit solve and
138  * \f$Y_i\f$ are parameters in this set of equations. The above time
139  * derivative, \f$\dot{X}_i\f$, is NOT likely the same as the real time
140  * derivative, \f$\dot{x}(x(t_i), y(t_i), t_i)\f$, unless
141  * \f$\hat{c}_i = c_i \rightarrow \hat{t}_i = t_i\f$
142  * (Reasoning: \f$x(t_i) \neq X_i\f$ and \f$y(t_i) \neq Y_i\f$ unless
143  * \f$\hat{t}_i = t_i\f$). Also note that the explicit term,
144  * \f$f^x(X_i,Y_i,t_i)\f$, is evaluated at the implicit stage time, \f$t_i\f$.
145  *
146  * We can form the time derivative
147  * \f{eqnarray*}{
148  * \dot{X}(X_i,Y_i,t_i) & = & - g^x(X_i,Y_i,t_i) - f^x(X_i,Y_i,t_i) \\
149  * \dot{X}(X_i,Y_i,t_i) & = &
150  * \frac{X_i - \tilde{X}}{a_{ii} \Delta t} - f^x(X_i,Y_i,t_i) \\
151  * \f}
152  * Returning to the governing equation for the IMEX solution vector, \f$X_i\f$
153  * \f{eqnarray*}{
154  * M^x(X_i,Y_i,t_i)\,
155  * \dot{X}(X_i,Y_i,t_i) + F^x(X_i,Y_i,t_i) + G^x(X_i,Y_i,t_i) & = & 0 \\
156  * M^x(X_i,Y_i,t_i)\,
157  * \left[ \frac{X_i - \tilde{X}}{a_{ii} \Delta t} - f^x(X_i,Y_i,t_i) \right]
158  * + F^x(X_i,Y_i,t_i) + G^x(X_i,Y_i,t_i) & = & 0 \\
159  * M^x(X_i,Y_i,t_i)\,
160  * \left[ \frac{X_i - \tilde{X}}{a_{ii} \Delta t} \right]
161  * + G(X_i,Y_i,t_i) & = & 0 \\
162  * \f}
163  * Recall \f$\mathcal{G}^x(\dot{x},x,y,t) = M^x(x,y,t)\,\dot{x} + G^x(x,y,t)\f$
164  * and if we define a pseudo time derivative, which is equivalent to the
165  * time derivative for the implicit solve,
166  * \f[
167  * \tilde{\dot{X}} = \frac{X_i - \tilde{X}}{a_{ii} \Delta t},
168  * \f]
169  * we can write
170  * \f[
171  * \mathcal{G}^x(\tilde{\dot{X}},X_i,Y_i,t_i) =
172  * M^x(X_i,Y_i,t_i)\, \tilde{\dot{X}} + G^x(X_i,Y_i,t_i) = 0
173  * \f]
174  *
175  * For general DIRK methods, we need to also handle the case when
176  * \f$a_{ii}=0\f$. The IMEX stage values can be simply evaluated
177  * similiar to the "explicit-only" stage values, e.g.,
178  * \f[
179  * X_i = \tilde{X} = x_{n-1} - \Delta t\,\sum_{j=1}^{i-1} \left(
180  * \hat{a}_{ij}\, f^x_j + a_{ij}\, g^x_j \right)
181  * \f]
182  * and then we can simply evaluate
183  * \f{eqnarray*}{
184  * f_i & = & f (Z_i,\hat{t}_i) \\
185  * g^x_i & = & g^x(X_i,Y_i, t_i)
186  * \f}
187  * We can then form the time derivative as
188  * \f[
189  * \dot{X}_i = - g^x(X_i,Y_i,t_i) - f^x(X_i,Y_i,t_i)
190  * \f]
191  * but again note that the explicit term, \f$f^x(X_i,Y_i,t_i)\f$,
192  * is evaluated at the implicit stage time, \f$t_i\f$.
193  *
194  * <b> Partitioned IMEX-RK Algorithm </b>
195  * The single-timestep algorithm for the partitioned IMEX-RK is
196  * - \f$Z_1 \leftarrow z_{n-1}\f$ (Recall \f$Z_i = \{Y_i,X_i\}^T\f$)
197  * - for \f$i = 1 \ldots s\f$ do
198  * - \f$Y_i = y_{n-1} -\Delta t \sum_{j=1}^{i-1} \hat{a}_{ij}\;f^y_j\f$
199  * - \f$\tilde{X} \leftarrow x_{n-1} - \Delta t\,\sum_{j=1}^{i-1} \left[
200  * \hat{a}_{ij}\, f^x_j + a_{ij}\, g^x_j \right] \f$
201  * - if \f$a_{ii} = 0\f$
202  * - \f$X_i \leftarrow \tilde{X}\f$
203  * - \f$g^x_i \leftarrow g^x(X_i,Y_i,t_i)\f$
204  * - else
205  * - Define \f$\tilde{\dot{X}}(X_i,Y_i,t_i)
206  * = \frac{X_i-\tilde{X}}{a_{ii} \Delta t}\f$
207  * - Solve \f$\mathcal{G}^x(\tilde{\dot{X}},X_i,Y_i,t_i) = 0\f$
208  * for \f$X_i\f$ where \f$Y_i\f$ are known parameters
209  * - \f$g^x_i \leftarrow - \tilde{\dot{X}}\f$
210  * - \f$f_i \leftarrow f(Z_i,\hat{t}_i)\f$
211  * - end for
212  * - \f$z_n = z_{n-1} - \Delta t\,\sum_{i=1}^{s}\hat{b}_i\, f_i\f$
213  * - \f$x_n \mathrel{+{=}} - \Delta t\,\sum_{i=1}^{s} b_i\, g^x_i\f$
214  *
215  * The First-Step-As-Last (FSAL) principle is not valid for IMEX RK Partition.
216  * The default is to set useFSAL=false, and useFSAL=true will result
217  * in an error.
218  *
219  * #### References
220  * -# Shadid, Cyr, Pawlowski, Widley, Scovazzi, Zeng, Phillips, Conde,
221  * Chuadhry, Hensinger, Fischer, Robinson, Rider, Niederhaus, Sanchez,
222  * "Towards an IMEX Monolithic ALE Method with Integrated UQ for
223  * Multiphysics Shock-hydro", SAND2016-11353, 2016, pp. 21-28.
224  * -# Cyr, "IMEX Lagrangian Methods", SAND2015-3745C.
225  */
226 template<class Scalar>
227 class StepperIMEX_RK_Partition : virtual public Tempus::StepperImplicit<Scalar>
228 {
229 public:
230 
231  /** \brief Default constructor.
232  *
233  * - Constructs with a default ParameterList.
234  * - Can reset ParameterList with setParameterList().
235  * - Requires subsequent setModel() and initialize() calls before calling
236  * takeStep().
237  */
239 
240  /// Constructor to specialize Stepper parameters.
242  const Teuchos::RCP<const Thyra::ModelEvaluator<Scalar> >& appModel,
243  Teuchos::RCP<Teuchos::ParameterList> pList);
244 
245  /// Constructor to use default Stepper parameters.
247  const Teuchos::RCP<const Thyra::ModelEvaluator<Scalar> >& appModel,
248  std::string stepperType = "Partitioned IMEX RK SSP2");
249 
250  /// Constructor for StepperFactory.
252  const Teuchos::RCP<const Thyra::ModelEvaluator<Scalar> >& models,
253  std::string stepperType, Teuchos::RCP<Teuchos::ParameterList> pList);
254 
255  /// \name Basic stepper methods
256  //@{
257  /// Set both the explicit and implicit tableau from ParameterList
258  virtual void setTableaus(Teuchos::RCP<Teuchos::ParameterList> pList,
259  std::string stepperType = "");
260 
261  /// Set the explicit tableau from ParameterList
262  virtual void setExplicitTableau(std::string stepperType,
263  Teuchos::RCP<Teuchos::ParameterList> pList);
264 
265  /// Set the explicit tableau from tableau
266  virtual void setExplicitTableau(
267  Teuchos::RCP<const RKButcherTableau<Scalar> > explicitTableau);
268 
269  /// Set the implicit tableau from ParameterList
270  virtual void setImplicitTableau(std::string stepperType,
271  Teuchos::RCP<Teuchos::ParameterList> pList);
272 
273  /// Set the implicit tableau from tableau
274  virtual void setImplicitTableau(
275  Teuchos::RCP<const RKButcherTableau<Scalar> > implicitTableau);
276 
277  virtual void setModel(
278  const Teuchos::RCP<const Thyra::ModelEvaluator<Scalar> >& appModel);
279 
280  virtual Teuchos::RCP<const Thyra::ModelEvaluator<Scalar> > getModel()
281  { return this->wrapperModel_; }
282 
283  virtual void setModelPair(
285  modelPair);
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  const Teuchos::RCP<const Thyra::VectorBase<Scalar> > & Y,
348  Scalar time, Scalar stepSize, Scalar stageNumber,
349  const Teuchos::RCP<Thyra::VectorBase<Scalar> > & G) const;
350 
351  void evalExplicitModel(
352  const Teuchos::RCP<const Thyra::VectorBase<Scalar> > & X,
353  Scalar time, Scalar stepSize, Scalar stageNumber,
354  const Teuchos::RCP<Thyra::VectorBase<Scalar> > & F) const;
355 
356 protected:
357 
358  std::string description_;
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> > stageZ_;
365  std::vector<Teuchos::RCP<Thyra::VectorBase<Scalar> > > stageF_;
366  std::vector<Teuchos::RCP<Thyra::VectorBase<Scalar> > > stageGx_;
367 
368  Teuchos::RCP<Thyra::VectorBase<Scalar> > xTilde_;
369 
370  Teuchos::RCP<StepperIMEX_RKPartObserver<Scalar> > stepperIMEX_RKPartObserver_;
371 
372 };
373 
374 
375 /** \brief Time-derivative interface for Partitioned 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_Partition_decl_hpp
virtual Scalar getAlpha(const Scalar dt) const
Return alpha = d(xDot)/dx.
Teuchos::RCP< const Teuchos::ParameterList > getValidParameters() const
Teuchos::RCP< WrapperModelEvaluator< Scalar > > wrapperModel_
Teuchos::RCP< Thyra::VectorBase< Scalar > > xTilde_
virtual void setImplicitTableau(std::string stepperType, Teuchos::RCP< Teuchos::ParameterList > pList)
Set the implicit tableau from ParameterList.
virtual void setModelPair(const Teuchos::RCP< WrapperModelEvaluatorPairPartIMEX_Basic< Scalar > > &modelPair)
Create WrapperModelPairIMEX from user-supplied ModelEvaluator pair.
Teuchos::RCP< const RKButcherTableau< Scalar > > implicitTableau_
Partitioned Implicit-Explicit Runge-Kutta (IMEX-RK) time stepper.
Teuchos::RCP< Teuchos::ParameterList > unsetParameterList()
virtual Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > getModel()
void evalExplicitModel(const Teuchos::RCP< const Thyra::VectorBase< Scalar > > &X, Scalar time, Scalar stepSize, Scalar stageNumber, const Teuchos::RCP< Thyra::VectorBase< Scalar > > &F) const
Teuchos::RCP< Thyra::VectorBase< Scalar > > stageZ_
StepperIMEX_RKPartTimeDerivative(Scalar s, Teuchos::RCP< const Thyra::VectorBase< Scalar > > xTilde)
Constructor.
std::vector< Teuchos::RCP< Thyra::VectorBase< Scalar > > > stageF_
Thyra Base interface for implicit time steppers.
virtual Teuchos::RCP< Tempus::StepperState< Scalar > > getDefaultStepperState()
Provide a StepperState to the SolutionState. This Stepper does not have any special state data...
ModelEvaluator pair for implicit and explicit (IMEX) evaulations.
void setParameterList(const Teuchos::RCP< Teuchos::ParameterList > &pl)
Teuchos::RCP< Teuchos::ParameterList > getDefaultParameters() const
Teuchos::RCP< Teuchos::ParameterList > getNonconstParameterList()
void evalImplicitModelExplicitly(const Teuchos::RCP< const Thyra::VectorBase< Scalar > > &X, const Teuchos::RCP< const Thyra::VectorBase< Scalar > > &Y, Scalar time, Scalar stepSize, Scalar stageNumber, const Teuchos::RCP< Thyra::VectorBase< Scalar > > &G) const
StepperObserver class for Stepper class.
Teuchos::RCP< SolutionHistory< Scalar > > solutionHistory(Teuchos::RCP< Teuchos::ParameterList > pList=Teuchos::null)
Nonmember constructor.
SolutionHistory is basically a container of SolutionStates. SolutionHistory maintains a collection of...
virtual void setObserver(Teuchos::RCP< StepperObserver< Scalar > > obs=Teuchos::null)
Set Observer.
Stepper integrates first-order ODEs.
virtual void initialize(Scalar s, Teuchos::RCP< const Thyra::VectorBase< Scalar > > xTilde)
Teuchos::RCP< const RKButcherTableau< Scalar > > explicitTableau_
This interface defines the time derivative connection between an implicit Stepper and WrapperModelEva...
virtual Scalar getBeta(const Scalar) const
Return beta = d(x)/dx.
std::vector< Teuchos::RCP< Thyra::VectorBase< Scalar > > > stageGx_
Teuchos::RCP< const Thyra::VectorBase< Scalar > > xTilde_
Time-derivative interface for Partitioned IMEX RK.
virtual void describe(Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel) const
virtual void setTableaus(Teuchos::RCP< Teuchos::ParameterList > pList, std::string stepperType="")
Set both the explicit and implicit tableau from ParameterList.
virtual void setModel(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &appModel)
virtual void takeStep(const Teuchos::RCP< SolutionHistory< Scalar > > &solutionHistory)
Take the specified timestep, dt, and return true if successful.
virtual void setInitialConditions(const Teuchos::RCP< SolutionHistory< Scalar > > &solutionHistory)
Set the initial conditions and make them consistent.
virtual void initialize()
Initialize during construction and after changing input parameters.
virtual 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< StepperIMEX_RKPartObserver< Scalar > > stepperIMEX_RKPartObserver_
virtual void setExplicitTableau(std::string stepperType, Teuchos::RCP< Teuchos::ParameterList > pList)
Set the explicit tableau from ParameterList.