Tempus  Version of the Day
Time Integration
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Tempus_StepperBackwardEuler_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_StepperBackwardEuler_impl_hpp
10 #define Tempus_StepperBackwardEuler_impl_hpp
11 
12 #include "Tempus_config.hpp"
15 #include "Tempus_WrapperModelEvaluatorBasic.hpp"
16 #include "Teuchos_VerboseObjectParameterListHelpers.hpp"
17 #include "NOX_Thyra.H"
18 
19 
20 namespace Tempus {
21 
22 // Forward Declaration for recursive includes (this Stepper <--> StepperFactory)
23 template<class Scalar> class StepperFactory;
24 
25 
26 template<class Scalar>
28 {
29  this->setStepperType( "Backward Euler");
30  this->setUseFSAL( this->getUseFSALDefault());
31  this->setICConsistency( this->getICConsistencyDefault());
32  this->setICConsistencyCheck( this->getICConsistencyCheckDefault());
33  this->setZeroInitialGuess( false);
34 
35 #ifndef TEMPUS_HIDE_DEPRECATED_CODE
36  this->setObserver();
37 #endif
38  this->setAppAction(Teuchos::null);
39  this->setDefaultSolver();
40  this->setPredictor("None");
41 }
42 
43 
44 #ifndef TEMPUS_HIDE_DEPRECATED_CODE
45 template<class Scalar>
47  const Teuchos::RCP<const Thyra::ModelEvaluator<Scalar> >& appModel,
48  const Teuchos::RCP<StepperObserver<Scalar> >& obs,
49  const Teuchos::RCP<Thyra::NonlinearSolverBase<Scalar> >& solver,
50  const Teuchos::RCP<Stepper<Scalar> >& predictorStepper,
51  bool useFSAL,
52  std::string ICConsistency,
53  bool ICConsistencyCheck,
54  bool zeroInitialGuess)
55 
56 {
57  this->setStepperType( "Backward Euler");
58  this->setUseFSAL( useFSAL);
59  this->setICConsistency( ICConsistency);
60  this->setICConsistencyCheck( ICConsistencyCheck);
61  this->setZeroInitialGuess( zeroInitialGuess);
62 
63  this->setObserver(obs);
64  this->setAppAction(Teuchos::null);
65  this->setSolver(solver);
66  this->setPredictor(predictorStepper);
67 
68  if (appModel != Teuchos::null) {
69  this->setModel(appModel);
70  this->initialize();
71  }
72 }
73 #endif
74 
75 
76 template<class Scalar>
78  const Teuchos::RCP<const Thyra::ModelEvaluator<Scalar> >& appModel,
79  const Teuchos::RCP<Thyra::NonlinearSolverBase<Scalar> >& solver,
80  const Teuchos::RCP<Stepper<Scalar> >& predictorStepper,
81  bool useFSAL,
82  std::string ICConsistency,
83  bool ICConsistencyCheck,
84  bool zeroInitialGuess,
85  const Teuchos::RCP<StepperBackwardEulerAppAction<Scalar> >& stepperBEAppAction)
86 {
87  this->setStepperType( "Backward Euler");
88  this->setUseFSAL( useFSAL);
89  this->setICConsistency( ICConsistency);
90  this->setICConsistencyCheck( ICConsistencyCheck);
91  this->setZeroInitialGuess( zeroInitialGuess);
92 
93 #ifndef TEMPUS_HIDE_DEPRECATED_CODE
94  this->setObserver();
95 #endif
96  this->setAppAction(stepperBEAppAction);
97  this->setSolver(solver);
98  this->setPredictor(predictorStepper);
99 
100  if (appModel != Teuchos::null) {
101  this->setModel(appModel);
102  this->initialize();
103  }
104 }
105 
106 
107 /// Set the predictor to a Stepper with default settings.
108 template<class Scalar>
109 void StepperBackwardEuler<Scalar>::setPredictor(std::string predictorType)
110 {
111  if (predictorType == "None") {
112  predictorStepper_ = Teuchos::null;
113  return;
114  }
115 
116  TEUCHOS_TEST_FOR_EXCEPTION(
117  this->wrapperModel_->getAppModel() == Teuchos::null, std::logic_error,
118  "Error - Need to set the model, setModel(), before calling "
119  "StepperBackwardEuler::setPredictor()\n");
120 
121  using Teuchos::RCP;
122  RCP<StepperFactory<Scalar> > sf = Teuchos::rcp(new StepperFactory<Scalar>());
123  predictorStepper_ =
124  sf->createStepper(predictorType, this->wrapperModel_->getAppModel());
125 
126  this->isInitialized_ = false;
127 }
128 
129 
130 /// Set the predictor.
131 template<class Scalar>
133  Teuchos::RCP<Stepper<Scalar> > predictorStepper)
134 {
135  predictorStepper_ = predictorStepper;
136  if (predictorStepper_ == Teuchos::null) return;
137 
138  TEUCHOS_TEST_FOR_EXCEPTION(
139  predictorStepper_->getModel() == Teuchos::null &&
140  this->wrapperModel_->getAppModel() == Teuchos::null, std::logic_error,
141  "Error - Need to set the model, setModel(), before calling "
142  "StepperBackwardEuler::setPredictor()\n");
143 
144  if (predictorStepper_->getModel() == Teuchos::null)
145  predictorStepper_->setModel(this->wrapperModel_->getAppModel());
146  predictorStepper_->initialize();
147 
148  this->isInitialized_ = false;
149 }
150 
151 
152 #ifndef TEMPUS_HIDE_DEPRECATED_CODE
153 template<class Scalar>
155  Teuchos::RCP<StepperObserver<Scalar> > obs)
156 {
157  if (obs == Teuchos::null) {
158  // Create default observer, otherwise keep current observer.
159  if (this->stepperObserver_ == Teuchos::null) {
160  stepperBEObserver_ =
161  Teuchos::rcp(new StepperBackwardEulerObserver<Scalar>());
162  this->stepperObserver_ =
163  Teuchos::rcp_dynamic_cast<StepperObserver<Scalar> >(stepperBEObserver_,true);
164  }
165  } else {
166  this->stepperObserver_ = obs;
167  stepperBEObserver_ =
168  Teuchos::rcp_dynamic_cast<StepperBackwardEulerObserver<Scalar> >
169  (this->stepperObserver_,true);
170  }
171 
172  this->isInitialized_ = false;
173 }
174 #endif
175 
176 
177 template<class Scalar>
179  Teuchos::RCP<StepperBackwardEulerAppAction<Scalar> > appAction)
180 {
181  if (appAction == Teuchos::null) {
182  // Create default appAction
183  stepperBEAppAction_ =
185  } else {
186  stepperBEAppAction_ = appAction;
187  }
188  this->isInitialized_ = false;
189 }
190 
191 
192 template<class Scalar>
194  const Teuchos::RCP<SolutionHistory<Scalar> >& solutionHistory)
195 {
196  using Teuchos::RCP;
197 
198  RCP<SolutionState<Scalar> > initialState = solutionHistory->getCurrentState();
199 
200  // Check if we need Stepper storage for xDot
201  if (initialState->getXDot() == Teuchos::null)
202  this->setStepperXDot(initialState->getX()->clone_v());
203 
205 
206  if (this->getUseFSAL()) {
207  RCP<Teuchos::FancyOStream> out = this->getOStream();
208  Teuchos::OSTab ostab(out,1,"StepperBackwardEuler::setInitialConditions()");
209  *out << "\nWarning -- The First-Step-As-Last (FSAL) principle is not "
210  << "needed with Backward Euler. The default is to set useFSAL=false, "
211  << "however useFSAL=true will also work but have no affect "
212  << "(i.e., no-op).\n" << std::endl;
213  }
214 }
215 
216 
217 template<class Scalar>
219  const Teuchos::RCP<SolutionHistory<Scalar> >& solutionHistory)
220 {
221  this->checkInitialized();
222 
223  using Teuchos::RCP;
224 
225  TEMPUS_FUNC_TIME_MONITOR("Tempus::StepperBackwardEuler::takeStep()");
226  {
227  TEUCHOS_TEST_FOR_EXCEPTION(solutionHistory->getNumStates() < 2,
228  std::logic_error,
229  "Error - StepperBackwardEuler<Scalar>::takeStep(...)\n"
230  "Need at least two SolutionStates for Backward Euler.\n"
231  " Number of States = " << solutionHistory->getNumStates() << "\n"
232  "Try setting in \"Solution History\" \"Storage Type\" = \"Undo\"\n"
233  " or \"Storage Type\" = \"Static\" and \"Storage Limit\" = \"2\"\n");
234 
235 #ifndef TEMPUS_HIDE_DEPRECATED_CODE
236  this->stepperObserver_->observeBeginTakeStep(solutionHistory, *this);
237 #endif
238  RCP<StepperBackwardEuler<Scalar> > thisStepper = Teuchos::rcpFromRef(*this);
239  stepperBEAppAction_->execute(solutionHistory, thisStepper,
241 
242  RCP<SolutionState<Scalar> > workingState=solutionHistory->getWorkingState();
243  RCP<SolutionState<Scalar> > currentState=solutionHistory->getCurrentState();
244 
245  RCP<const Thyra::VectorBase<Scalar> > xOld = currentState->getX();
246  RCP<Thyra::VectorBase<Scalar> > x = workingState->getX();
247 
248  RCP<Thyra::VectorBase<Scalar> > xDot = this->getStepperXDot(workingState);
249 
250  computePredictor(solutionHistory);
251  if (workingState->getSolutionStatus() == Status::FAILED)
252  return;
253 
254  const Scalar time = workingState->getTime();
255  const Scalar dt = workingState->getTimeStep();
256 
257  // Setup TimeDerivative
258  Teuchos::RCP<TimeDerivative<Scalar> > timeDer =
260  Scalar(1.0)/dt,xOld));
261 
262  const Scalar alpha = Scalar(1.0)/dt;
263  const Scalar beta = Scalar(1.0);
264  auto p = Teuchos::rcp(new ImplicitODEParameters<Scalar>(
265  timeDer, dt, alpha, beta));
266 
267 #ifndef TEMPUS_HIDE_DEPRECATED_CODE
268  if (!Teuchos::is_null(stepperBEObserver_))
269  stepperBEObserver_->observeBeforeSolve(solutionHistory, *this);
270 #endif
271  stepperBEAppAction_->execute(solutionHistory, thisStepper,
273 
274  const Thyra::SolveStatus<Scalar> sStatus =
275  this->solveImplicitODE(x, xDot, time, p);
276 
277 #ifndef TEMPUS_HIDE_DEPRECATED_CODE
278  if (!Teuchos::is_null(stepperBEObserver_))
279  stepperBEObserver_->observeAfterSolve(solutionHistory, *this);
280 #endif
281  stepperBEAppAction_->execute(solutionHistory, thisStepper,
283 
284  if (workingState->getXDot() != Teuchos::null)
285  timeDer->compute(x, xDot);
286 
287  workingState->setSolutionStatus(sStatus); // Converged --> pass.
288  workingState->setOrder(this->getOrder());
289  workingState->computeNorms(currentState);
290 #ifndef TEMPUS_HIDE_DEPRECATED_CODE
291  this->stepperObserver_->observeEndTakeStep(solutionHistory, *this);
292 #endif
293  stepperBEAppAction_->execute(solutionHistory, thisStepper,
295  }
296  return;
297 }
298 
299 template<class Scalar>
301  const Teuchos::RCP<SolutionHistory<Scalar> >& solutionHistory)
302 {
303  if (predictorStepper_ == Teuchos::null) return;
304  predictorStepper_->takeStep(solutionHistory);
305 
306  if (solutionHistory->getWorkingState()->getSolutionStatus()==Status::FAILED) {
307  Teuchos::RCP<Teuchos::FancyOStream> out = this->getOStream();
308  Teuchos::OSTab ostab(out,1,"StepperBackwardEuler::computePredictor");
309  *out << "Warning - predictorStepper has failed." << std::endl;
310  } else {
311  // Reset status to WORKING since this is the predictor
312  solutionHistory->getWorkingState()->setSolutionStatus(Status::WORKING);
313  }
314 }
315 
316 
317 /** \brief Provide a StepperState to the SolutionState.
318  * This Stepper does not have any special state data,
319  * so just provide the base class StepperState with the
320  * Stepper description. This can be checked to ensure
321  * that the input StepperState can be used by this Stepper.
322  */
323 template<class Scalar>
324 Teuchos::RCP<Tempus::StepperState<Scalar> >
327 {
328  Teuchos::RCP<Tempus::StepperState<Scalar> > stepperState =
329  rcp(new StepperState<Scalar>(this->getStepperType()));
330  return stepperState;
331 }
332 
333 
334 template<class Scalar>
336  Teuchos::FancyOStream &out,
337  const Teuchos::EVerbosityLevel verbLevel) const
338 {
339  out << std::endl;
340  Stepper<Scalar>::describe(out, verbLevel);
341  StepperImplicit<Scalar>::describe(out, verbLevel);
342 
343  out << "--- StepperBackwardEuler ---\n";
344  if (predictorStepper_ != Teuchos::null) {
345  out << " predictor stepper type = "
346  << predictorStepper_->description() << std::endl;
347  }
348  out << " predictorStepper_ = "
349  << predictorStepper_ << std::endl;
350  out << " predictorStepper_->isInitialized() = "
351  << Teuchos::toString(predictorStepper_->isInitialized()) << std::endl;
352 #ifndef TEMPUS_HIDE_DEPRECATED_CODE
353  out << " stepperBEObserver_ = "
354  << stepperBEObserver_ << std::endl;
355 #endif
356  out << " stepperBEAppAction_ = "
357  << stepperBEAppAction_ << std::endl;
358  out << "----------------------------" << std::endl;
359 }
360 
361 
362 template<class Scalar>
363 bool StepperBackwardEuler<Scalar>::isValidSetup(Teuchos::FancyOStream & out) const
364 {
365  bool isValidSetup = true;
366 
367  if ( !Stepper<Scalar>::isValidSetup(out) ) isValidSetup = false;
368  if ( !StepperImplicit<Scalar>::isValidSetup(out) ) isValidSetup = false;
369 
370  if (predictorStepper_ != Teuchos::null) {
371  if ( !predictorStepper_->isInitialized() ) {
372  isValidSetup = false;
373  out << "The predictor stepper is not initialized!\n";
374  }
375  }
376 
377 #ifndef TEMPUS_HIDE_DEPRECATED_CODE
378  if (stepperBEObserver_ == Teuchos::null) {
379  isValidSetup = false;
380  out << "The Backward Euler observer is not set!\n";
381  }
382 #endif
383  if (stepperBEAppAction_ == Teuchos::null) {
384  isValidSetup = false;
385  out << "The Backward Euler AppAction is not set!\n";
386  }
387 
388  return isValidSetup;
389 }
390 
391 
392 template<class Scalar>
393 Teuchos::RCP<const Teuchos::ParameterList>
395 {
396  Teuchos::RCP<Teuchos::ParameterList> pl = Teuchos::parameterList();
397  getValidParametersBasic(pl, this->getStepperType());
398  pl->set<std::string>("Solver Name", "Default Solver");
399  pl->set<bool> ("Zero Initial Guess", false);
400  pl->set<std::string>("Predictor Stepper Type", "None");
401  Teuchos::RCP<Teuchos::ParameterList> solverPL = defaultSolverParameters();
402  pl->set("Default Solver", *solverPL);
403 
404  return pl;
405 }
406 
407 
408 template <class Scalar>
409 int
411 {
412  return 2;
413 }
414 
415 
416 template <class Scalar>
417 void
419  Thyra::VectorBase<Scalar>& residual,
420  const Teuchos::Array< Teuchos::RCP<const Thyra::VectorBase<Scalar> > >& x,
421  const Teuchos::Array<Scalar>& t,
422  const Thyra::VectorBase<Scalar>& p,
423  const int param_index) const
424 {
425  typedef Thyra::ModelEvaluatorBase MEB;
426  MEB::OutArgs<Scalar> outArgs = this->wrapperModel_->getOutArgs();
427  outArgs.set_f(Teuchos::rcpFromRef(residual));
428  computeStepResidDerivImpl(outArgs, x, t, p, param_index);
429 }
430 
431 template <class Scalar>
432 void
434  Thyra::LinearOpBase<Scalar>& jacobian,
435  const Teuchos::Array< Teuchos::RCP<const Thyra::VectorBase<Scalar> > >& x,
436  const Teuchos::Array<Scalar>& t,
437  const Thyra::VectorBase<Scalar>& p,
438  const int param_index,
439  const int deriv_index) const
440 {
441  typedef Thyra::ModelEvaluatorBase MEB;
442  MEB::OutArgs<Scalar> outArgs = this->wrapperModel_->getOutArgs();
443  TEUCHOS_ASSERT(outArgs.supports(MEB::OUT_ARG_W_op));
444  outArgs.set_W_op(Teuchos::rcpFromRef(jacobian));
445  computeStepResidDerivImpl(outArgs, x, t, p, param_index, deriv_index);
446 }
447 
448 template <class Scalar>
449 void
451  Thyra::LinearOpBase<Scalar>& deriv,
452  const Teuchos::Array< Teuchos::RCP<const Thyra::VectorBase<Scalar> > >& x,
453  const Teuchos::Array<Scalar>& t,
454  const Thyra::VectorBase<Scalar>& p,
455  const int param_index) const
456 {
457  typedef Thyra::ModelEvaluatorBase MEB;
458  MEB::OutArgs<Scalar> outArgs = this->wrapperModel_->getOutArgs();
459  TEUCHOS_ASSERT(outArgs.supports(MEB::OUT_ARG_DfDp, param_index).supports(MEB::DERIV_LINEAR_OP));
460  outArgs.set_DfDp(param_index,
461  MEB::Derivative<Scalar>(Teuchos::rcpFromRef(deriv)));
462  computeStepResidDerivImpl(outArgs, x, t, p, param_index);
463 }
464 
465 template <class Scalar>
466 void
468  Thyra::LinearOpWithSolveBase<Scalar>& jacobian_solver,
469  const Teuchos::Array< Teuchos::RCP<const Thyra::VectorBase<Scalar> > >& x,
470  const Teuchos::Array<Scalar>& t,
471  const Thyra::VectorBase<Scalar>& p,
472  const int param_index) const
473 {
474  typedef Thyra::ModelEvaluatorBase MEB;
475  MEB::OutArgs<Scalar> outArgs = this->wrapperModel_->getOutArgs();
476  TEUCHOS_ASSERT(outArgs.supports(MEB::OUT_ARG_W));
477  outArgs.set_W(Teuchos::rcpFromRef(jacobian_solver));
478  computeStepResidDerivImpl(outArgs, x, t, p, param_index, 0);
479 }
480 
481 template <class Scalar>
482 void
484  const Thyra::ModelEvaluatorBase::OutArgs<Scalar>& outArgs,
485  const Teuchos::Array< Teuchos::RCP<const Thyra::VectorBase<Scalar> > >& x,
486  const Teuchos::Array<Scalar>& t,
487  const Thyra::VectorBase<Scalar>& p,
488  const int param_index,
489  const int deriv_index) const
490 {
491  using Teuchos::RCP;
492  typedef Thyra::ModelEvaluatorBase MEB;
493 
494  TEUCHOS_ASSERT(x.size() == 2);
495  TEUCHOS_ASSERT(t.size() == 2);
496  RCP<const Thyra::VectorBase<Scalar> > xn = x[0];
497  RCP<const Thyra::VectorBase<Scalar> > xo = x[1];
498  const Scalar tn = t[0];
499  const Scalar to = t[1];
500  const Scalar dt = tn-to;
501 
502  // compute x_dot
503  RCP<Thyra::VectorBase<Scalar> > x_dot = xn->clone_v();
504  Teuchos::RCP<TimeDerivative<Scalar> > timeDer =
505  Teuchos::rcp(new StepperBackwardEulerTimeDerivative<Scalar>(Scalar(1.0)/dt,xo));
506  timeDer->compute(xn, x_dot);
507 
508  // evaluate model
509  MEB::InArgs<Scalar> inArgs = this->wrapperModel_->getInArgs();
510  inArgs.set_x(xn);
511  if (inArgs.supports(MEB::IN_ARG_x_dot )) inArgs.set_x_dot (x_dot);
512  if (inArgs.supports(MEB::IN_ARG_t )) inArgs.set_t (tn);
513  if (inArgs.supports(MEB::IN_ARG_step_size )) inArgs.set_step_size(dt);
514  inArgs.set_p(param_index, Teuchos::rcpFromRef(p));
515  TEUCHOS_ASSERT(inArgs.supports(MEB::IN_ARG_alpha));
516  TEUCHOS_ASSERT(inArgs.supports(MEB::IN_ARG_beta));
517  if (deriv_index == 0) {
518  // df/dx_n = df/dx_dot * dx_dot/dx_n + df/dx_n = 1/dt*df/dx_dot + df/dx_n
519  inArgs.set_alpha(Scalar(1.0)/dt);
520  inArgs.set_beta(Scalar(1.0));
521  }
522  else if (deriv_index == 1) {
523  // df/dx_{n-1} = df/dx_dot * dx_dot/dx_{n-1} = -1/dt*df/dx_dot
524  inArgs.set_alpha(Scalar(-1.0)/dt);
525  inArgs.set_beta(Scalar(0.0));
526  }
527  this->wrapperModel_->getAppModel()->evalModel(inArgs, outArgs);
528 }
529 
530 } // namespace Tempus
531 #endif // Tempus_StepperBackwardEuler_impl_hpp
StepperBackwardEulerObserver class for StepperBackwardEuler.
virtual void setInitialConditions(const Teuchos::RCP< SolutionHistory< Scalar > > &solutionHistory)
Set the initial conditions and make them consistent.
Teuchos::RCP< const Teuchos::ParameterList > getValidParameters() const
void computeStepResidDerivImpl(const Thyra::ModelEvaluatorBase::OutArgs< Scalar > &outArgs, const Teuchos::Array< Teuchos::RCP< const Thyra::VectorBase< Scalar > > > &x, const Teuchos::Array< Scalar > &t, const Thyra::VectorBase< Scalar > &p, const int param_index, const int deriv_index=0) const
Implementation of computeStep*() methods.
const std::string toString(const Status status)
Convert Status to string.
virtual void computeStepResidual(Thyra::VectorBase< Scalar > &residual, const Teuchos::Array< Teuchos::RCP< const Thyra::VectorBase< Scalar > > > &x, const Teuchos::Array< Scalar > &t, const Thyra::VectorBase< Scalar > &p, const int param_index) const
Compute time step residual.
virtual void takeStep(const Teuchos::RCP< SolutionHistory< Scalar > > &solutionHistory)
Take the specified timestep, dt, and return true if successful.
virtual void computePredictor(const Teuchos::RCP< SolutionHistory< Scalar > > &solutionHistory)
Compute predictor given the supplied stepper.
virtual int stencilLength() const
Return the number of solution vectors in the time step stencil.
virtual Teuchos::RCP< Tempus::StepperState< Scalar > > getDefaultStepperState()
Get a default (initial) StepperState.
Teuchos::RCP< Teuchos::ParameterList > defaultSolverParameters()
Returns the default solver ParameterList for implicit Steppers.
Application Action for StepperBackwardEuler.
virtual void setObserver(Teuchos::RCP< StepperObserver< Scalar > > obs=Teuchos::null)
Set Observer.
Thyra Base interface for time steppers.
StepperState is a simple class to hold state information about the stepper.
virtual void computeStepSolver(Thyra::LinearOpWithSolveBase< Scalar > &jacobian_solver, const Teuchos::Array< Teuchos::RCP< const Thyra::VectorBase< Scalar > > > &x, const Teuchos::Array< Scalar > &t, const Thyra::VectorBase< Scalar > &p, const int param_index) const
Compute time step Jacobian solver.
Thyra Base interface for implicit time steppers.
virtual void describe(Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel) const
virtual void computeStepJacobian(Thyra::LinearOpBase< Scalar > &jacobian, const Teuchos::Array< Teuchos::RCP< const Thyra::VectorBase< Scalar > > > &x, const Teuchos::Array< Scalar > &t, const Thyra::VectorBase< Scalar > &p, const int param_index, const int deriv_index) const
Compute time step Jacobian.
virtual void computeStepParamDeriv(Thyra::LinearOpBase< Scalar > &deriv, const Teuchos::Array< Teuchos::RCP< const Thyra::VectorBase< Scalar > > > &x, const Teuchos::Array< Scalar > &t, const Thyra::VectorBase< Scalar > &p, const int param_index) const
Compute time step derivative w.r.t. model parameters.
void setPredictor(std::string predictorType="None")
Set the predictor.
StepperObserver class for Stepper class.
SolutionHistory is basically a container of SolutionStates. SolutionHistory maintains a collection of...
virtual void setAppAction(Teuchos::RCP< StepperBackwardEulerAppAction< Scalar > > appAction)
virtual bool isValidSetup(Teuchos::FancyOStream &out) const
virtual void setInitialConditions(const Teuchos::RCP< SolutionHistory< Scalar > > &solutionHistory)
Set the initial conditions and make them consistent.
virtual void describe(Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel) const
Time-derivative interface for Backward Euler.
virtual void describe(Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel) const
void getValidParametersBasic(Teuchos::RCP< Teuchos::ParameterList > pl, std::string stepperType)
Provide basic parameters to Steppers.