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"
16 #include "Tempus_StepperRKObserverComposite.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  * Requires subsequent setModel(), setSolver() and initialize()
234  * calls before calling takeStep().
235  */
237 
238  /// Constructor to specialize Stepper parameters.
240  const Teuchos::RCP<const Thyra::ModelEvaluator<Scalar> >& appModel,
241  const Teuchos::RCP<StepperObserver<Scalar> >& obs,
242  const Teuchos::RCP<Thyra::NonlinearSolverBase<Scalar> >& solver,
243  bool useFSAL,
244  std::string ICConsistency,
245  bool ICConsistencyCheck,
246  bool zeroInitialGuess,
247  std::string stepperType,
248  Teuchos::RCP<const RKButcherTableau<Scalar> > explicitTableau,
249  Teuchos::RCP<const RKButcherTableau<Scalar> > implicitTableau,
250  Scalar order);
251 
252  /// \name Basic stepper methods
253  //@{
254  /// Set both the explicit and implicit tableau from ParameterList
255  virtual void setTableaus(std::string stepperType = "",
256  Teuchos::RCP<const RKButcherTableau<Scalar> > explicitTableau = Teuchos::null,
257  Teuchos::RCP<const RKButcherTableau<Scalar> > implicitTableau = Teuchos::null);
258 
259  /// Set the explicit tableau from tableau
260  virtual void setExplicitTableau(
261  Teuchos::RCP<const RKButcherTableau<Scalar> > explicitTableau);
262 
263  /// Set the implicit tableau from tableau
264  virtual void setImplicitTableau(
265  Teuchos::RCP<const RKButcherTableau<Scalar> > implicitTableau);
266 
267  virtual void setModel(
268  const Teuchos::RCP<const Thyra::ModelEvaluator<Scalar> >& appModel);
269 
270  virtual Teuchos::RCP<const Thyra::ModelEvaluator<Scalar> > getModel()
271  { return this->wrapperModel_; }
272 
273  virtual void setModelPair(
275  modelPair);
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  const Teuchos::RCP<const Thyra::VectorBase<Scalar> > & Y,
333  Scalar time, Scalar stepSize, Scalar stageNumber,
334  const Teuchos::RCP<Thyra::VectorBase<Scalar> > & G) const;
335 
336  void evalExplicitModel(
337  const Teuchos::RCP<const Thyra::VectorBase<Scalar> > & X,
338  Scalar time, Scalar stepSize, Scalar stageNumber,
339  const Teuchos::RCP<Thyra::VectorBase<Scalar> > & F) const;
340 
341  void setOrder(Scalar order) { order_ = order; }
342 
343 protected:
344 
345  Teuchos::RCP<const RKButcherTableau<Scalar> > explicitTableau_;
346  Teuchos::RCP<const RKButcherTableau<Scalar> > implicitTableau_;
347 
348  Scalar order_;
349 
350  Teuchos::RCP<Thyra::VectorBase<Scalar> > stageZ_;
351  std::vector<Teuchos::RCP<Thyra::VectorBase<Scalar> > > stageF_;
352  std::vector<Teuchos::RCP<Thyra::VectorBase<Scalar> > > stageGx_;
353 
354  Teuchos::RCP<Thyra::VectorBase<Scalar> > xTilde_;
355 
356  Teuchos::RCP<StepperRKObserverComposite<Scalar> > stepperObserver_;
357 
358 };
359 
360 
361 /** \brief Time-derivative interface for Partitioned IMEX RK.
362  *
363  * Given the stage state \f$X_i\f$ and
364  * \f[
365  * \tilde{X} = x_{n-1} +\Delta t \sum_{j=1}^{i-1} a_{ij}\,\dot{X}_{j},
366  * \f]
367  * compute the IMEX RK stage time-derivative,
368  * \f[
369  * \dot{X}_i = \frac{X_{i} - \tilde{X}}{a_{ii} \Delta t}
370  * \f]
371  * \f$\ddot{x}\f$ is not used and set to null.
372  */
373 template <typename Scalar>
375  : virtual public Tempus::TimeDerivative<Scalar>
376 {
377 public:
378 
379  /// Constructor
381  Scalar s, Teuchos::RCP<const Thyra::VectorBase<Scalar> > xTilde)
382  { initialize(s, xTilde); }
383 
384  /// Destructor
386 
387  /// Compute the time derivative.
388  virtual void compute(
389  Teuchos::RCP<const Thyra::VectorBase<Scalar> > x,
390  Teuchos::RCP< Thyra::VectorBase<Scalar> > xDot,
391  Teuchos::RCP< Thyra::VectorBase<Scalar> > xDotDot = Teuchos::null)
392  {
393  xDotDot = Teuchos::null;
394 
395  // ith stage
396  // s = 1/(dt*a_ii)
397  // xOld = solution at beginning of time step
398  // xTilde = xOld + dt*(Sum_{j=1}^{i-1} a_ij x_dot_j)
399  // xDotTilde = - (s*x_i - s*xTilde)
400  Thyra::V_StVpStV(xDot.ptr(),s_,*x,-s_,*xTilde_);
401  }
402 
403  virtual void initialize(Scalar s,
404  Teuchos::RCP<const Thyra::VectorBase<Scalar> > xTilde)
405  { s_ = s; xTilde_ = xTilde; }
406 
407 private:
408 
409  Teuchos::RCP<const Thyra::VectorBase<Scalar> > xTilde_;
410  Scalar s_; // = 1/(dt*a_ii)
411 };
412 
413 
414 } // namespace Tempus
415 #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 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 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.
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 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.
virtual Teuchos::RCP< StepperObserver< Scalar > > getObserver() const
Get Observer.
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 setExplicitTableau(Teuchos::RCP< const RKButcherTableau< Scalar > > explicitTableau)
Set the explicit tableau from tableau.
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.
virtual void setImplicitTableau(Teuchos::RCP< const RKButcherTableau< Scalar > > implicitTableau)
Set the implicit tableau from tableau.
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 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.
Teuchos::RCP< StepperRKObserverComposite< Scalar > > stepperObserver_
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.