Tempus  Version of the Day
Time Integration
Tempus_StepperExplicitRK_impl.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_StepperExplicitRK_impl_hpp
10 #define Tempus_StepperExplicitRK_impl_hpp
11 
12 #include "Tempus_RKButcherTableauBuilder.hpp"
14 #include "Teuchos_VerboseObjectParameterListHelpers.hpp"
15 #include "Thyra_VectorStdOps.hpp"
16 
17 
18 namespace Tempus {
19 
20 template<class Scalar>
22  const Teuchos::RCP<const Thyra::ModelEvaluator<Scalar> >& appModel,
23  std::string stepperType)
24 {
25  this->setTableau(stepperType);
26  this->setModel(appModel);
27  this->initialize();
28 }
29 
30 template<class Scalar>
32  const Teuchos::RCP<const Thyra::ModelEvaluator<Scalar> >& appModel,
33  Teuchos::RCP<Teuchos::ParameterList> pList)
34 {
35  this->setTableau(pList);
36  this->setParameterList(pList);
37  this->setModel(appModel);
38  this->initialize();
39 }
40 
41 template<class Scalar>
43  const Teuchos::RCP<const Thyra::ModelEvaluator<Scalar> >& appModel,
44  std::string stepperType,
45  Teuchos::RCP<Teuchos::ParameterList> pList)
46 {
47  this->setTableau(stepperType);
48  this->setParameterList(pList);
49  this->setModel(appModel);
50  this->initialize();
51 }
52 
53 template<class Scalar>
55  const Teuchos::RCP<const Thyra::ModelEvaluator<Scalar> >& appModel)
56 {
57  this->validExplicitODE(appModel);
58  appModel_ = appModel;
59 
60  inArgs_ = appModel_->getNominalValues();
61  outArgs_ = appModel_->createOutArgs();
62 }
63 
64 template<class Scalar>
66  const Teuchos::RCP<Thyra::ModelEvaluator<Scalar> >& appModel)
67 {
68  this->setModel(appModel);
69 }
70 
71 template<class Scalar>
72 void StepperExplicitRK<Scalar>::setSolver(std::string solverName)
73 {
74  Teuchos::RCP<Teuchos::FancyOStream> out = this->getOStream();
75  Teuchos::OSTab ostab(out,1,"StepperExplicitRK::setSolver()");
76  *out << "Warning -- No solver to set for StepperExplicitRK "
77  << "(i.e., explicit method).\n" << std::endl;
78  return;
79 }
80 
81 template<class Scalar>
83  Teuchos::RCP<Teuchos::ParameterList> solverPL)
84 {
85  Teuchos::RCP<Teuchos::FancyOStream> out = this->getOStream();
86  Teuchos::OSTab ostab(out,1,"StepperExplicitRK::setSolver()");
87  *out << "Warning -- No solver to set for StepperExplicitRK "
88  << "(i.e., explicit method).\n" << std::endl;
89  return;
90 }
91 
92 template<class Scalar>
94  Teuchos::RCP<Thyra::NonlinearSolverBase<Scalar> > solver)
95 {
96  Teuchos::RCP<Teuchos::FancyOStream> out = this->getOStream();
97  Teuchos::OSTab ostab(out,1,"StepperExplicitRK::setSolver()");
98  *out << "Warning -- No solver to set for StepperExplicitRK "
99  << "(i.e., explicit method).\n" << std::endl;
100  return;
101 }
102 
103 template<class Scalar>
105  const Teuchos::RCP<SolutionHistory<Scalar> >& sh) const
106 {
107 
108  Scalar dt = std::numeric_limits<Scalar>::max();
109  if (!stepperPL_->get<bool>("Use Embedded")) return dt;
110 
111  Teuchos::RCP<SolutionState<Scalar> > currentState=sh->getCurrentState();
112  Teuchos::RCP<SolutionStateMetaData<Scalar> > metaData = currentState->getMetaData();
113  const int order = metaData->getOrder();
114  const Scalar time = metaData->getTime();
115  const Scalar errorAbs = metaData->getTolRel();
116  const Scalar errorRel = metaData->getTolAbs();
117 
118  Teuchos::RCP<Thyra::VectorBase<Scalar> > stageX_, scratchX;
119  stageX_ = Thyra::createMember(appModel_->get_f_space());
120  scratchX = Thyra::createMember(appModel_->get_f_space());
121  Thyra::assign(stageX_.ptr(), *(currentState->getX()));
122 
123  std::vector<Teuchos::RCP<Thyra::VectorBase<Scalar> > > stageXDot_(2);
124  for (int i=0; i<2; ++i) {
125  stageXDot_[i] = Thyra::createMember(appModel_->get_f_space());
126  assign(stageXDot_[i].ptr(), Teuchos::ScalarTraits<Scalar>::zero());
127  }
128 
129  // A: one functione evaluation at F(t_0, X_0)
130  typedef Thyra::ModelEvaluatorBase MEB;
131  Thyra::ModelEvaluatorBase::InArgs<Scalar> inArgs_ = appModel_->getNominalValues();
132  Thyra::ModelEvaluatorBase::OutArgs<Scalar> outArgs_ = appModel_->createOutArgs();
133  inArgs_.set_x(stageX_);
134  if (inArgs_.supports(MEB::IN_ARG_t)) inArgs_.set_t(time);
135  if (inArgs_.supports(MEB::IN_ARG_x_dot)) inArgs_.set_x_dot(Teuchos::null);
136  outArgs_.set_f(stageXDot_[0]); // K1
137  appModel_->evalModel(inArgs_,outArgs_);
138 
139  auto err_func = [] (Teuchos::RCP<Thyra::VectorBase<Scalar> > U,
140  const Scalar rtol, const Scalar atol,
141  Teuchos::RCP<Thyra::VectorBase<Scalar> > absU)
142  {
143  // compute err = Norm_{WRMS} with w = Atol + Rtol * | U |
144  Thyra::assign(absU.ptr(), *U);
145  Thyra::abs(*U, absU.ptr()); // absU = | X0 |
146  Thyra::Vt_S(absU.ptr(), rtol); // absU *= Rtol
147  Thyra::Vp_S(absU.ptr(), atol); // absU += Atol
148  Thyra::ele_wise_divide(Teuchos::as<Scalar>(1.0), *U, *absU, absU.ptr());
149  Scalar err = Thyra::norm_inf(*absU);
150  return err;
151  };
152 
153  Scalar d0 = err_func(stageX_, errorRel, errorAbs, scratchX);
154  Scalar d1 = err_func(stageXDot_[0], errorRel, errorAbs, scratchX);
155 
156  // b) first guess for the step size
157  dt = Teuchos::as<Scalar>(0.01)*(d0/d1);
158 
159  // c) perform one explicit Euler step (X_1)
160  Thyra::Vp_StV(stageX_.ptr(), dt, *(stageXDot_[0]));
161 
162  // compute F(t_0 + dt, X_1)
163  inArgs_.set_x(stageX_);
164  if (inArgs_.supports(MEB::IN_ARG_t)) inArgs_.set_t(time + dt);
165  if (inArgs_.supports(MEB::IN_ARG_x_dot)) inArgs_.set_x_dot(Teuchos::null);
166  outArgs_.set_f(stageXDot_[1]); // K2
167  appModel_->evalModel(inArgs_,outArgs_);
168 
169  // d) compute estimate of the second derivative of the solution
170  // d2 = || f(t_0 + dt, X_1) - f(t_0, X_0) || / dt
171  Teuchos::RCP<Thyra::VectorBase<Scalar> > errX;
172  errX = Thyra::createMember(appModel_->get_f_space());
173  assign(errX.ptr(), Teuchos::ScalarTraits<Scalar>::zero());
174  Thyra::V_VmV(errX.ptr(), *(stageXDot_[1]), *(stageXDot_[0]));
175  Scalar d2 = err_func(errX, errorRel, errorAbs, scratchX) / dt;
176 
177  // e) compute step size h_1 (from m = 0 order Taylor series)
178  Scalar max_d1_d2 = std::max(d1, d2);
179  Scalar h1 = std::pow((0.01/max_d1_d2),(1.0/(order+1)));
180 
181  // f) propse starting step size
182  dt = std::min(100*dt, h1);
183  return dt;
184 }
185 
186 template<class Scalar>
187 void StepperExplicitRK<Scalar>::setTableau(std::string stepperType)
188 {
189  if (stepperType == "") {
190  this->setTableau();
191  } else {
192  ERK_ButcherTableau_ = createRKBT<Scalar>(stepperType, this->stepperPL_);
193  }
194 
195  TEUCHOS_TEST_FOR_EXCEPTION(ERK_ButcherTableau_->isImplicit() == true,
196  std::logic_error,
197  "Error - StepperExplicitRK received an implicit Butcher Tableau!\n"
198  << " Stepper Type = " << stepperType << "\n");
199  description_ = ERK_ButcherTableau_->description();
200 }
201 
202 template<class Scalar>
204  Teuchos::RCP<Teuchos::ParameterList> pList)
205 {
206  if (pList == Teuchos::null) {
207  // Create default parameters if null, otherwise keep current parameters.
208  if (this->stepperPL_ == Teuchos::null)
209  this->stepperPL_ = this->getDefaultParameters();
210  } else {
211  this->stepperPL_ = pList;
212  }
213 
214  std::string stepperType =
215  this->stepperPL_->template get<std::string>("Stepper Type",
216  "RK Explicit 4 Stage");
217  ERK_ButcherTableau_ = createRKBT<Scalar>(stepperType, this->stepperPL_);
218 
219  TEUCHOS_TEST_FOR_EXCEPTION(ERK_ButcherTableau_->isImplicit() == true,
220  std::logic_error,
221  "Error - StepperExplicitRK received an implicit Butcher Tableau!\n"
222  << " Stepper Type = " << stepperType << "\n");
223  description_ = ERK_ButcherTableau_->description();
224 }
225 
226 
227 template<class Scalar>
229  Teuchos::RCP<StepperObserver<Scalar> > obs)
230 {
231  if (obs == Teuchos::null) {
232  // Create default observer, otherwise keep current observer.
233  if (stepperObserver_ == Teuchos::null) {
234  stepperExplicitRKObserver_ =
235  Teuchos::rcp(new StepperExplicitRKObserver<Scalar>());
236  stepperObserver_ =
237  Teuchos::rcp_dynamic_cast<StepperObserver<Scalar> >
238  (stepperExplicitRKObserver_);
239  }
240  } else {
241  stepperObserver_ = obs;
242  stepperExplicitRKObserver_ =
243  Teuchos::rcp_dynamic_cast<StepperExplicitRKObserver<Scalar> >
244  (stepperObserver_);
245  }
246 }
247 
248 
249 template<class Scalar>
251 {
252  TEUCHOS_TEST_FOR_EXCEPTION( ERK_ButcherTableau_ == Teuchos::null,
253  std::logic_error,
254  "Error - Need to set the Butcher Tableau, setTableau(), before calling "
255  "StepperExplicitRK::initialize()\n");
256 
257  TEUCHOS_TEST_FOR_EXCEPTION( appModel_ == Teuchos::null, std::logic_error,
258  "Error - Need to set the model, setModel(), before calling "
259  "StepperExplicitRK::initialize()\n");
260 
261  this->setTableau(stepperPL_);
262  this->setParameterList(stepperPL_);
263  this->setObserver();
264 
265  // Initialize the stage vectors
266  int numStages = ERK_ButcherTableau_->numStages();
267  stageX_ = Thyra::createMember(appModel_->get_f_space());
268  stageXDot_.resize(numStages);
269  for (int i=0; i<numStages; ++i) {
270  stageXDot_[i] = Thyra::createMember(appModel_->get_f_space());
271  assign(stageXDot_[i].ptr(), Teuchos::ScalarTraits<Scalar>::zero());
272  }
273 
274  if (ERK_ButcherTableau_->isEmbedded() and stepperPL_->get<bool>("Use Embedded")){
275  ee_ = Thyra::createMember(appModel_->get_f_space());
276  abs_u0 = Thyra::createMember(appModel_->get_f_space());
277  abs_u = Thyra::createMember(appModel_->get_f_space());
278  sc = Thyra::createMember(appModel_->get_f_space());
279  }
280 }
281 
282 template<class Scalar>
284  const Teuchos::RCP<SolutionHistory<Scalar> >& solutionHistory)
285 {
286  using Teuchos::RCP;
287 
288  TEMPUS_FUNC_TIME_MONITOR("Tempus::StepperExplicitRK::takeStep()");
289  {
290  TEUCHOS_TEST_FOR_EXCEPTION(solutionHistory->getNumStates() < 2,
291  std::logic_error,
292  "Error - StepperExplicitRK<Scalar>::takeStep(...)\n"
293  "Need at least two SolutionStates for ExplicitRK.\n"
294  " Number of States = " << solutionHistory->getNumStates() << "\n"
295  "Try setting in \"Solution History\" \"Storage Type\" = \"Undo\"\n"
296  " or \"Storage Type\" = \"Static\" and \"Storage Limit\" = \"2\"\n");
297 
298  stepperObserver_->observeBeginTakeStep(solutionHistory, *this);
299  RCP<SolutionState<Scalar> > currentState=solutionHistory->getCurrentState();
300  RCP<SolutionState<Scalar> > workingState=solutionHistory->getWorkingState();
301  const Scalar dt = workingState->getTimeStep();
302  const Scalar time = currentState->getTime();
303 
304  const int numStages = ERK_ButcherTableau_->numStages();
305  Teuchos::SerialDenseMatrix<int,Scalar> A = ERK_ButcherTableau_->A();
306  Teuchos::SerialDenseVector<int,Scalar> b = ERK_ButcherTableau_->b();
307  Teuchos::SerialDenseVector<int,Scalar> c = ERK_ButcherTableau_->c();
308 
309  // Compute stage solutions
310  for (int i=0; i < numStages; ++i) {
311  if (!Teuchos::is_null(stepperExplicitRKObserver_))
312  stepperExplicitRKObserver_->observeBeginStage(solutionHistory, *this);
313  Thyra::assign(stageX_.ptr(), *(currentState->getX()));
314  for (int j=0; j < i; ++j) {
315  if (A(i,j) != Teuchos::ScalarTraits<Scalar>::zero()) {
316  Thyra::Vp_StV(stageX_.ptr(), dt*A(i,j), *stageXDot_[j]);
317  }
318  }
319  const Scalar ts = time + c(i)*dt;
320 
321  // Evaluate model -----------------
322  typedef Thyra::ModelEvaluatorBase MEB;
323  inArgs_.set_x(stageX_);
324  if (inArgs_.supports(MEB::IN_ARG_t)) inArgs_.set_t(ts);
325 
326  if (inArgs_.supports(MEB::IN_ARG_x_dot)) inArgs_.set_x_dot(Teuchos::null);
327  outArgs_.set_f(stageXDot_[i]);
328 
329  if (!Teuchos::is_null(stepperExplicitRKObserver_))
330  stepperExplicitRKObserver_->observeBeforeExplicit(solutionHistory, *this);
331  appModel_->evalModel(inArgs_,outArgs_);
332  // --------------------------------
333  if (!Teuchos::is_null(stepperExplicitRKObserver_))
334  stepperExplicitRKObserver_->observeEndStage(solutionHistory, *this);
335  }
336 
337  // Sum for solution: x_n = x_n-1 + Sum{ b(i) * dt*f(i) }
338  Thyra::assign((workingState->getX()).ptr(), *(currentState->getX()));
339  for (int i=0; i < numStages; ++i) {
340  if (b(i) != Teuchos::ScalarTraits<Scalar>::zero()) {
341  Thyra::Vp_StV((workingState->getX()).ptr(), dt*b(i), *(stageXDot_[i]));
342  }
343  }
344 
345 
346  // At this point, the stepper has passed.
347  // but when using adaptive time stepping, the embedded method can change the step status
348  workingState->setSolutionStatus(Status::PASSED);
349 
350  if (ERK_ButcherTableau_->isEmbedded() and stepperPL_->get<bool>("Use Embedded")){
351 
352  RCP<SolutionStateMetaData<Scalar> > metaData = workingState->getMetaData();
353  const Scalar tolAbs = metaData->getTolRel();
354  const Scalar tolRel = metaData->getTolAbs();
355 
356  // just compute the error weight vector
357  // (all that is needed is the error, and not the embedded solution)
358  Teuchos::SerialDenseVector<int,Scalar> errWght = b ;
359  errWght -= ERK_ButcherTableau_->bstar();
360 
361  //compute local truncation error estimate: | u^{n+1} - \hat{u}^{n+1} |
362  // Sum for solution: ee_n = Sum{ (b(i) - bstar(i)) * dt*f(i) }
363  assign(ee_.ptr(), Teuchos::ScalarTraits<Scalar>::zero());
364  for (int i=0; i < numStages; ++i) {
365  if (errWght(i) != Teuchos::ScalarTraits<Scalar>::zero()) {
366  Thyra::Vp_StV(ee_.ptr(), dt*errWght(i), *(stageXDot_[i]));
367  }
368  }
369 
370  // compute: Atol + max(|u^n|, |u^{n+1}| ) * Rtol
371  Thyra::abs( *(currentState->getX()), abs_u0.ptr());
372  Thyra::abs( *(workingState->getX()), abs_u.ptr());
373  Thyra::pair_wise_max_update(tolRel, *abs_u0, abs_u.ptr());
374  Thyra::add_scalar(tolAbs, abs_u.ptr());
375 
376  //compute: || ee / sc ||
377  assign(sc.ptr(), Teuchos::ScalarTraits<Scalar>::zero());
378  Thyra::ele_wise_divide(Teuchos::as<Scalar>(1.0), *ee_, *abs_u, sc.ptr());
379  Scalar err = Thyra::norm_inf(*sc);
380  metaData->setErrorRel(err);
381 
382  // test if step should be rejected
383  if (err > 1.0) workingState->setSolutionStatus(Status::FAILED);
384  }
385 
386  workingState->setOrder(this->getOrder());
387  stepperObserver_->observeEndTakeStep(solutionHistory, *this);
388  }
389  return;
390 }
391 
392 
393 /** \brief Provide a StepperState to the SolutionState.
394  * This Stepper does not have any special state data,
395  * so just provide the base class StepperState with the
396  * Stepper description. This can be checked to ensure
397  * that the input StepperState can be used by this Stepper.
398  */
399 template<class Scalar>
400 Teuchos::RCP<Tempus::StepperState<Scalar> > StepperExplicitRK<Scalar>::
402 {
403  Teuchos::RCP<Tempus::StepperState<Scalar> > stepperState =
404  rcp(new StepperState<Scalar>(description()));
405  return stepperState;
406 }
407 
408 
409 template<class Scalar>
411 {
412  return(description_);
413 }
414 
415 
416 template<class Scalar>
418  Teuchos::FancyOStream &out,
419  const Teuchos::EVerbosityLevel verbLevel) const
420 {
421  out << description() << "::describe:" << std::endl
422  << "appModel_ = " << appModel_->description() << std::endl;
423 }
424 
425 
426 template <class Scalar>
428  const Teuchos::RCP<Teuchos::ParameterList> & pList)
429 {
430  if (pList == Teuchos::null) {
431  // Create default parameters if null, otherwise keep current parameters.
432  if (stepperPL_ == Teuchos::null) stepperPL_ = this->getDefaultParameters();
433  } else {
434  stepperPL_ = pList;
435  }
436  // Can not validate because of optional Parameters.
437  stepperPL_->validateParametersAndSetDefaults(*this->getValidParameters(),0);
438 }
439 
440 
441 template<class Scalar>
442 Teuchos::RCP<const Teuchos::ParameterList>
444 {
445  //std::stringstream Description;
446  //Description << "'Stepper Type' sets the stepper method.\n"
447  // << "For Explicit RK the following methods are valid:\n"
448  // << " General ERK\n"
449  // << " RK Forward Euler\n"
450  // << " RK Explicit 4 Stage\n"
451  // << " RK Explicit 3/8 Rule\n"
452  // << " RK Explicit 4 Stage 3rd order by Runge\n"
453  // << " RK Explicit 5 Stage 3rd order by Kinnmark and Gray\n"
454  // << " RK Explicit 3 Stage 3rd order\n"
455  // << " RK Explicit 3 Stage 3rd order TVD\n"
456  // << " RK Explicit 3 Stage 3rd order by Heun\n"
457  // << " RK Explicit 2 Stage 2nd order by Runge\n"
458  // << " RK Explicit Trapezoidal\n";
459 
460  Teuchos::RCP<Teuchos::ParameterList> pl = Teuchos::parameterList();
461  pl->set<bool>("Use Embedded", false,
462  "'Whether to use Embedded Stepper (if available) or not\n"
463  " 'true' - Stepper will compute embedded solution and is adaptive.\n"
464  " 'false' - Stepper is not embedded(adaptive).\n");
465  pl->setParameters(*(ERK_ButcherTableau_->getValidParameters()));
466  return pl;
467 }
468 
469 
470 template<class Scalar>
471 Teuchos::RCP<Teuchos::ParameterList>
473 {
474  Teuchos::RCP<Teuchos::ParameterList> pl = Teuchos::parameterList();
475  pl->set<bool>("Use Embedded", false,
476  "'Whether to use Embedded Stepper (if available) or not\n"
477  " 'true' - Stepper will compute embedded solution and is adaptive.\n"
478  " 'false' - Stepper is not embedded(adaptive).\n");
479  if (ERK_ButcherTableau_ == Teuchos::null) {
480  auto ERK_ButcherTableau =
481  createRKBT<Scalar>("RK Explicit 4 Stage", Teuchos::null);
482  pl->setParameters(*(ERK_ButcherTableau->getValidParameters()));
483  } else {
484  pl->setParameters(*(ERK_ButcherTableau_->getValidParameters()));
485  }
486  return pl;
487 }
488 
489 
490 template <class Scalar>
491 Teuchos::RCP<Teuchos::ParameterList>
493 {
494  return(stepperPL_);
495 }
496 
497 
498 template <class Scalar>
499 Teuchos::RCP<Teuchos::ParameterList>
501 {
502  Teuchos::RCP<Teuchos::ParameterList> temp_plist = stepperPL_;
503  stepperPL_ = Teuchos::null;
504  return(temp_plist);
505 }
506 
507 
508 } // namespace Tempus
509 #endif // Tempus_StepperExplicitRK_impl_hpp
Tempus::StepperState
StepperState is a simple class to hold state information about the stepper.
Definition: Tempus_StepperState.hpp:36
Tempus::StepperExplicitRKObserver
StepperExplicitRKObserver class for StepperExplicitRK.
Definition: Tempus_StepperExplicitRKObserver.hpp:35
Tempus::solutionHistory
Teuchos::RCP< SolutionHistory< Scalar > > solutionHistory(Teuchos::RCP< Teuchos::ParameterList > pList=Teuchos::null)
Nonmember constructor.
Definition: Tempus_SolutionHistory_impl.hpp:504
Tempus::StepperExplicitRK::setModel
virtual void setModel(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &appModel)
Definition: Tempus_StepperExplicitRK_impl.hpp:54
Tempus::StepperExplicitRK::describe
virtual void describe(Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel) const
Definition: Tempus_StepperExplicitRK_impl.hpp:417
Tempus
Definition: Tempus_AdjointAuxSensitivityModelEvaluator_decl.hpp:20
Tempus::StepperExplicitRK::unsetParameterList
Teuchos::RCP< Teuchos::ParameterList > unsetParameterList()
Definition: Tempus_StepperExplicitRK_impl.hpp:500
Tempus_RKButcherTableau.hpp
Tempus::StepperExplicitRK::getDefaultParameters
Teuchos::RCP< Teuchos::ParameterList > getDefaultParameters() const
Definition: Tempus_StepperExplicitRK_impl.hpp:472
Tempus::StepperExplicitRK::StepperExplicitRK
StepperExplicitRK()
Default Constructor – not allowed.
Tempus::StepperExplicitRK::getValidParameters
Teuchos::RCP< const Teuchos::ParameterList > getValidParameters() const
Definition: Tempus_StepperExplicitRK_impl.hpp:443
Tempus::StepperExplicitRK::description
virtual std::string description() const
Definition: Tempus_StepperExplicitRK_impl.hpp:410
Tempus::StepperExplicitRK::setObserver
virtual void setObserver(Teuchos::RCP< StepperObserver< Scalar > > obs=Teuchos::null)
Set Observer.
Definition: Tempus_StepperExplicitRK_impl.hpp:228
Tempus::StepperObserver
StepperObserver class for Stepper class.
Definition: Tempus_StepperObserver.hpp:38
Tempus::StepperExplicitRK::getDefaultStepperState
virtual Teuchos::RCP< Tempus::StepperState< Scalar > > getDefaultStepperState()
Get a default (initial) StepperState.
Definition: Tempus_StepperExplicitRK_impl.hpp:401
Tempus::StepperExplicitRK::setNonConstModel
virtual void setNonConstModel(const Teuchos::RCP< Thyra::ModelEvaluator< Scalar > > &appModel)
Definition: Tempus_StepperExplicitRK_impl.hpp:65
Tempus::StepperExplicitRK::takeStep
virtual void takeStep(const Teuchos::RCP< SolutionHistory< Scalar > > &solutionHistory)
Take the specified timestep, dt, and return true if successful.
Definition: Tempus_StepperExplicitRK_impl.hpp:283
Tempus::StepperExplicitRK::getInitTimeStep
virtual Scalar getInitTimeStep(const Teuchos::RCP< SolutionHistory< Scalar > > &solutionHistory) const
Definition: Tempus_StepperExplicitRK_impl.hpp:104
Tempus::StepperExplicitRK::setParameterList
void setParameterList(const Teuchos::RCP< Teuchos::ParameterList > &pl)
Definition: Tempus_StepperExplicitRK_impl.hpp:427
Tempus::PASSED
Definition: Tempus_Types.hpp:17
Tempus::SolutionHistory
SolutionHistory is basically a container of SolutionStates. SolutionHistory maintains a collection of...
Definition: Tempus_Integrator.hpp:25
Tempus::StepperExplicitRK::getNonconstParameterList
Teuchos::RCP< Teuchos::ParameterList > getNonconstParameterList()
Definition: Tempus_StepperExplicitRK_impl.hpp:492
Tempus::FAILED
Definition: Tempus_Types.hpp:18
Tempus::StepperExplicitRK::initialize
virtual void initialize()
Initialize during construction and after changing input parameters.
Definition: Tempus_StepperExplicitRK_impl.hpp:250
Tempus::StepperExplicitRK::setSolver
virtual void setSolver(std::string solverName)
Set solver via ParameterList solver name.
Definition: Tempus_StepperExplicitRK_impl.hpp:72
Tempus::StepperExplicitRK::setTableau
virtual void setTableau(std::string stepperType)
Definition: Tempus_StepperExplicitRK_impl.hpp:187