Tempus  Version of the Day
Time Integration
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Tempus_IntegratorPseudoTransientForwardSensitivity_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_IntegratorPseudoTransientForwardSensitivity_impl_hpp
10 #define Tempus_IntegratorPseudoTransientForwardSensitivity_impl_hpp
11 
13 #include "Teuchos_VerboseObjectParameterListHelpers.hpp"
14 #include "Thyra_DefaultMultiVectorProductVector.hpp"
15 #include "Thyra_VectorStdOps.hpp"
16 #include "Thyra_MultiVectorStdOps.hpp"
17 
18 namespace Tempus {
19 
20 template<class Scalar>
23  Teuchos::RCP<Teuchos::ParameterList> inputPL,
24  const Teuchos::RCP<Thyra::ModelEvaluator<Scalar> >& model) :
25  reuse_solver_(false)
26 {
27  model_ = model;
29  state_integrator_ = integratorBasic<Scalar>(inputPL, model_);
30  sens_integrator_ = integratorBasic<Scalar>(inputPL, sens_model_);
31 }
32 
33 template<class Scalar>
36  const Teuchos::RCP<Thyra::ModelEvaluator<Scalar> >& model,
37  std::string stepperType) :
38  reuse_solver_(false),
39  force_W_update_(false)
40 {
41  model_ = model;
42  sens_model_ = createSensitivityModel(model, Teuchos::null);
43  state_integrator_ = integratorBasic<Scalar>(model_, stepperType);
44  sens_integrator_ = integratorBasic<Scalar>(sens_model_, stepperType);
45 }
46 
47 template<class Scalar>
50  reuse_solver_(false),
51  force_W_update_(false)
52 {
53  state_integrator_ = integratorBasic<Scalar>();
54  sens_integrator_ = integratorBasic<Scalar>();
55 }
56 
57 template<class Scalar>
58 bool
61 {
62  using Teuchos::RCP;
63  using Thyra::VectorBase;
64 
65  // Run state integrator and get solution
66  bool state_status = state_integrator_->advanceTime();
67 
68  // Set solution in sensitivity ME
69  sens_model_->setForwardSolutionState(state_integrator_->getCurrentState());
70 
71  // Reuse state solver if requested
72  if (reuse_solver_ &&
73  state_integrator_->getStepper()->getSolver() != Teuchos::null) {
74  sens_model_->setSolver(state_integrator_->getStepper()->getSolver(),
75  force_W_update_);
76  }
77 
78  // Run sensitivity integrator
79  bool sens_status = sens_integrator_->advanceTime();
80 
81  buildSolutionHistory();
82 
83  return state_status && sens_status;
84 }
85 
86 template<class Scalar>
87 bool
89 advanceTime(const Scalar timeFinal)
90 {
91  using Teuchos::RCP;
92  using Thyra::VectorBase;
93 
94  // Run state integrator and get solution
95  bool state_status = state_integrator_->advanceTime(timeFinal);
96 
97  // Set solution in sensitivity ME
98  sens_model_->setForwardSolutionState(state_integrator_->getCurrentState());
99 
100  // Reuse state solver if requested
101  if (reuse_solver_ &&
102  state_integrator_->getStepper()->getSolver() != Teuchos::null) {
103  sens_model_->setSolver(state_integrator_->getStepper()->getSolver(),
104  force_W_update_);
105  }
106 
107  // Run sensitivity integrator
108  bool sens_status = sens_integrator_->advanceTime(timeFinal);
109 
110  buildSolutionHistory();
111 
112  return state_status && sens_status;
113 }
114 
115 template<class Scalar>
116 Scalar
118 getTime() const
119 {
120  return solutionHistory_->getCurrentTime();
121 }
122 
123 template<class Scalar>
124 int
126 getIndex() const
127 {
128  return solutionHistory_->getCurrentIndex();
129 }
130 
131 template<class Scalar>
132 Status
134 getStatus() const
135 {
136  Status state_status = state_integrator_->getStatus();
137  Status sens_status = sens_integrator_->getStatus();
138  if (state_status == FAILED || sens_status == FAILED)
139  return FAILED;
140  if (state_status == WORKING || sens_status == WORKING)
141  return WORKING;
142  return PASSED;
143 }
144 
145 template<class Scalar>
146 Teuchos::RCP<Stepper<Scalar> >
148 getStepper() const
149 {
150  return state_integrator_->getStepper();
151 }
152 
153 template<class Scalar>
154 Teuchos::RCP<Teuchos::ParameterList>
157 {
158  return state_integrator_->getTempusParameterList();
159 }
160 
161 template<class Scalar>
162 void
164 setTempusParameterList(Teuchos::RCP<Teuchos::ParameterList> pl)
165 {
166  state_integrator_->setTempusParameterList(pl);
167  sens_integrator_->setTempusParameterList(pl);
168 }
169 
170 template<class Scalar>
171 Teuchos::RCP<const SolutionHistory<Scalar> >
174 {
175  return solutionHistory_;
176 }
177 
178 template<class Scalar>
179 Teuchos::RCP<const TimeStepControl<Scalar> >
182 {
183  return state_integrator_->getTimeStepControl();
184 }
185 
186 template<class Scalar>
187 Teuchos::RCP<TimeStepControl<Scalar> >
190 {
191  return state_integrator_->getNonConstTimeStepControl();
192 }
193 
194 template<class Scalar>
197  Teuchos::RCP<const Thyra::VectorBase<Scalar> > x0,
198  Teuchos::RCP<const Thyra::VectorBase<Scalar> > xdot0,
199  Teuchos::RCP<const Thyra::VectorBase<Scalar> > xdotdot0,
200  Teuchos::RCP<const Thyra::MultiVectorBase<Scalar> > DxDp0,
201  Teuchos::RCP<const Thyra::MultiVectorBase<Scalar> > DxdotDp0,
202  Teuchos::RCP<const Thyra::MultiVectorBase<Scalar> > DxdotdotDp0)
203 {
204  using Teuchos::RCP;
205  using Teuchos::rcp_dynamic_cast;
206  using Thyra::VectorSpaceBase;
207  using Thyra::assign;
208  using Thyra::createMember;
209  typedef Thyra::DefaultMultiVectorProductVector<Scalar> DMVPV;
210 
211  //
212  // Create and initialize product X, Xdot, Xdotdot
213 
214  RCP< const VectorSpaceBase<Scalar> > space = sens_model_->get_x_space();
215  RCP<DMVPV> X = rcp_dynamic_cast<DMVPV>(createMember(space));
216  RCP<DMVPV> Xdot = rcp_dynamic_cast<DMVPV>(createMember(space));
217  RCP<DMVPV> Xdotdot = rcp_dynamic_cast<DMVPV>(createMember(space));
218  const Scalar zero = Teuchos::ScalarTraits<Scalar>::zero();
219 
220  // x
221  if (DxDp0 == Teuchos::null)
222  assign(X->getNonconstMultiVector().ptr(), zero);
223  else
224  assign(X->getNonconstMultiVector().ptr(), *DxDp0);
225 
226  // xdot
227  if (DxdotDp0 == Teuchos::null)
228  assign(Xdot->getNonconstMultiVector().ptr(), zero);
229  else
230  assign(Xdot->getNonconstMultiVector().ptr(), *DxdotDp0);
231 
232  // xdotdot
233  if (DxdotDp0 == Teuchos::null)
234  assign(Xdotdot->getNonconstMultiVector().ptr(), zero);
235  else
236  assign(Xdotdot->getNonconstMultiVector().ptr(), *DxdotdotDp0);
237 
238  state_integrator_->initializeSolutionHistory(t0, x0, xdot0, xdotdot0);
239  sens_integrator_->initializeSolutionHistory(t0, X, Xdot, Xdotdot);
240 }
241 
242 template<class Scalar>
243 Teuchos::RCP<const Thyra::VectorBase<Scalar> >
245 getX() const
246 {
247  using Teuchos::RCP;
248  using Teuchos::rcp_dynamic_cast;
249  typedef Thyra::DefaultMultiVectorProductVector<Scalar> DMVPV;
250 
251  RCP<const DMVPV> X =
252  rcp_dynamic_cast<const DMVPV>(solutionHistory_->getCurrentState()->getX());
253  return X->getMultiVector()->col(0);
254 }
255 
256 template<class Scalar>
257 Teuchos::RCP<const Thyra::MultiVectorBase<Scalar> >
259 getDxDp() const
260 {
261  using Teuchos::RCP;
262  using Teuchos::rcp_dynamic_cast;
263  typedef Thyra::DefaultMultiVectorProductVector<Scalar> DMVPV;
264 
265  RCP<const DMVPV> X =
266  rcp_dynamic_cast<const DMVPV>(solutionHistory_->getCurrentState()->getX());
267  const int num_param = X->getMultiVector()->domain()->dim()-1;
268  const Teuchos::Range1D rng(1,num_param);
269  return X->getMultiVector()->subView(rng);
270 }
271 
272 template<class Scalar>
273 Teuchos::RCP<const Thyra::VectorBase<Scalar> >
275 getXdot() const
276 {
277  using Teuchos::RCP;
278  using Teuchos::rcp_dynamic_cast;
279  typedef Thyra::DefaultMultiVectorProductVector<Scalar> DMVPV;
280 
281  RCP<const DMVPV> Xdot =
282  rcp_dynamic_cast<const DMVPV>(solutionHistory_->getCurrentState()->getXDot());
283  return Xdot->getMultiVector()->col(0);
284 }
285 
286 template<class Scalar>
287 Teuchos::RCP<const Thyra::MultiVectorBase<Scalar> >
289 getDxdotDp() const
290 {
291  using Teuchos::RCP;
292  using Teuchos::rcp_dynamic_cast;
293  typedef Thyra::DefaultMultiVectorProductVector<Scalar> DMVPV;
294 
295  RCP<const DMVPV> Xdot =
296  rcp_dynamic_cast<const DMVPV>(solutionHistory_->getCurrentState()->getXDot());
297  const int num_param = Xdot->getMultiVector()->domain()->dim()-1;
298  const Teuchos::Range1D rng(1,num_param);
299  return Xdot->getMultiVector()->subView(rng);
300 }
301 
302 template<class Scalar>
303 Teuchos::RCP<const Thyra::VectorBase<Scalar> >
305 getXdotdot() const
306 {
307  using Teuchos::RCP;
308  using Teuchos::rcp_dynamic_cast;
309  typedef Thyra::DefaultMultiVectorProductVector<Scalar> DMVPV;
310 
311  RCP<const DMVPV> Xdotdot =
312  rcp_dynamic_cast<const DMVPV>(solutionHistory_->getCurrentState()->getXDotDot());
313  return Xdotdot->getMultiVector()->col(0);
314 }
315 
316 template<class Scalar>
317 Teuchos::RCP<const Thyra::MultiVectorBase<Scalar> >
320 {
321  using Teuchos::RCP;
322  using Teuchos::rcp_dynamic_cast;
323  typedef Thyra::DefaultMultiVectorProductVector<Scalar> DMVPV;
324 
325  RCP<const DMVPV> Xdotdot =
326  rcp_dynamic_cast<const DMVPV>(solutionHistory_->getCurrentState()->getXDotDot());
327  const int num_param = Xdotdot->getMultiVector()->domain()->dim()-1;
328  const Teuchos::Range1D rng(1,num_param);
329  return Xdotdot->getMultiVector()->subView(rng);
330 }
331 
332 template<class Scalar>
333 std::string
335 description() const
336 {
337  std::string name = "Tempus::IntegratorPseudoTransientForwardSensitivity";
338  return(name);
339 }
340 
341 template<class Scalar>
342 void
345  Teuchos::FancyOStream &out,
346  const Teuchos::EVerbosityLevel verbLevel) const
347 {
348  out << description() << "::describe" << std::endl;
349  state_integrator_->describe(out, verbLevel);
350  sens_integrator_->describe(out, verbLevel);
351 }
352 
353 template<class Scalar>
354 void
356 setParameterList(const Teuchos::RCP<Teuchos::ParameterList> & inputPL)
357 {
358  state_integrator_->setParameterList(inputPL);
359  sens_integrator_->setParameterList(inputPL);
360  reuse_solver_ =
361  inputPL->sublist("Sensitivities").get("Reuse State Linear Solver", false);
362  force_W_update_ =
363  inputPL->sublist("Sensitivities").get("Force W Update", false);
364 }
365 
366 template<class Scalar>
367 Teuchos::RCP<Teuchos::ParameterList>
370 {
371  state_integrator_->unsetParameterList();
372  return sens_integrator_->unsetParameterList();
373 }
374 
375 template<class Scalar>
376 Teuchos::RCP<const Teuchos::ParameterList>
379 {
380  Teuchos::RCP<Teuchos::ParameterList> pl =
381  Teuchos::rcp(new Teuchos::ParameterList);
382  Teuchos::RCP<const Teuchos::ParameterList> integrator_pl =
383  state_integrator_->getValidParameters();
384  Teuchos::RCP<const Teuchos::ParameterList> sensitivity_pl =
386  pl->setParameters(*integrator_pl);
387  pl->sublist("Sensitivities").setParameters(*sensitivity_pl);
388  pl->sublist("Sensitivities").set("Reuse State Linear Solver", false);
389  pl->sublist("Sensitivities").set("Force W Update", false);
390 
391  return pl;
392 }
393 
394 template<class Scalar>
395 Teuchos::RCP<Teuchos::ParameterList>
398 {
399  return state_integrator_->getNonconstParameterList();
400 }
401 
402 template <class Scalar>
403 Teuchos::RCP<SensitivityModelEvaluatorBase<Scalar> >
406  const Teuchos::RCP<Thyra::ModelEvaluator<Scalar> >& model,
407  const Teuchos::RCP<Teuchos::ParameterList>& inputPL)
408 {
409  using Teuchos::rcp;
410 
411  Teuchos::RCP<Teuchos::ParameterList> pl = Teuchos::parameterList();
412  if (inputPL != Teuchos::null) {
413  *pl = inputPL->sublist("Sensitivities");
414  }
415  reuse_solver_ = pl->get("Reuse State Linear Solver", false);
416  force_W_update_ = pl->get("Force W Update", true);
417  pl->remove("Reuse State Linear Solver");
418  pl->remove("Force W Update");
419  return wrapStaggeredFSAModelEvaluator(model, pl);
420 }
421 
422 template<class Scalar>
423 void
426 {
427  using Teuchos::RCP;
428  using Teuchos::rcp;
429  using Teuchos::rcp_dynamic_cast;
430  using Teuchos::ParameterList;
431  using Thyra::VectorBase;
432  using Thyra::MultiVectorBase;
433  using Thyra::VectorSpaceBase;
434  using Thyra::createMembers;
435  using Thyra::multiVectorProductVector;
436  using Thyra::assign;
437  typedef Thyra::DefaultMultiVectorProductVector<Scalar> DMVPV;
438 
439  // Create combined solution histories, first for the states with zero
440  // sensitivities and then for the sensitivities with frozen states
441  RCP<ParameterList> shPL =
442  Teuchos::sublist(state_integrator_->getIntegratorParameterList(),
443  "Solution History", true);
444  solutionHistory_ = rcp(new SolutionHistory<Scalar>(shPL));
445 
446  const int num_param =
447  rcp_dynamic_cast<const DMVPV>(sens_integrator_->getX())->getMultiVector()->domain()->dim();
448  RCP<const VectorSpaceBase<Scalar> > x_space = model_->get_x_space();
449  RCP<const Thyra::DefaultMultiVectorProductVectorSpace<Scalar> > prod_space =
450  Thyra::multiVectorProductVectorSpace(x_space, num_param+1);
451  const Teuchos::Range1D rng(1,num_param);
452  const Scalar zero = Teuchos::ScalarTraits<Scalar>::zero();
453 
454  RCP<const SolutionHistory<Scalar> > state_solution_history =
455  state_integrator_->getSolutionHistory();
456  int num_states = state_solution_history->getNumStates();
457  for (int i=0; i<num_states; ++i) {
458  RCP<const SolutionState<Scalar> > state = (*state_solution_history)[i];
459 
460  // X
461  RCP< MultiVectorBase<Scalar> > x_mv =
462  createMembers(x_space, num_param+1);
463  assign(x_mv->col(0).ptr(), *(state->getX()));
464  assign(x_mv->subView(rng).ptr(), zero);
465  RCP<VectorBase<Scalar> > x = multiVectorProductVector(prod_space, x_mv);
466 
467  // X-Dot
468  RCP<VectorBase<Scalar> > x_dot;
469  if (state->getXDot() != Teuchos::null) {
470  RCP< MultiVectorBase<Scalar> > x_dot_mv =
471  createMembers(x_space, num_param+1);
472  assign(x_dot_mv->col(0).ptr(), *(state->getXDot()));
473  assign(x_dot_mv->subView(rng).ptr(), zero);
474  x_dot = multiVectorProductVector(prod_space, x_dot_mv);
475  }
476 
477  // X-Dot-Dot
478  RCP<VectorBase<Scalar> > x_dot_dot;
479  if (state->getXDotDot() != Teuchos::null) {
480  RCP< MultiVectorBase<Scalar> > x_dot_dot_mv =
481  createMembers(x_space, num_param+1);
482  assign(x_dot_dot_mv->col(0).ptr(), *(state->getXDotDot()));
483  assign(x_dot_dot_mv->subView(rng).ptr(), zero);
484  x_dot_dot = multiVectorProductVector(prod_space, x_dot_dot_mv);
485  }
486 
487  RCP<SolutionState<Scalar> > prod_state =
488  rcp(new SolutionState<Scalar>(state->getMetaData()->clone(),
489  x, x_dot, x_dot_dot,
490  state->getStepperState()->clone()));
491  solutionHistory_->addState(prod_state);
492  }
493 
494  RCP<const VectorBase<Scalar> > frozen_x =
495  state_solution_history->getCurrentState()->getX();
496  RCP<const VectorBase<Scalar> > frozen_x_dot =
497  state_solution_history->getCurrentState()->getXDot();
498  RCP<const VectorBase<Scalar> > frozen_x_dot_dot =
499  state_solution_history->getCurrentState()->getXDotDot();
500  RCP<const SolutionHistory<Scalar> > sens_solution_history =
501  sens_integrator_->getSolutionHistory();
502  num_states = sens_solution_history->getNumStates();
503  for (int i=0; i<num_states; ++i) {
504  RCP<const SolutionState<Scalar> > state = (*sens_solution_history)[i];
505 
506  // X
507  RCP< MultiVectorBase<Scalar> > x_mv =
508  createMembers(x_space, num_param+1);
509  RCP<const MultiVectorBase<Scalar> > dxdp =
510  rcp_dynamic_cast<const DMVPV>(state->getX())->getMultiVector();
511  assign(x_mv->col(0).ptr(), *(frozen_x));
512  assign(x_mv->subView(rng).ptr(), *dxdp);
513  RCP<VectorBase<Scalar> > x = multiVectorProductVector(prod_space, x_mv);
514 
515  // X-Dot
516  RCP<VectorBase<Scalar> > x_dot;
517  if (state->getXDot() != Teuchos::null) {
518  RCP< MultiVectorBase<Scalar> > x_dot_mv =
519  createMembers(x_space, num_param+1);
520  RCP<const MultiVectorBase<Scalar> > dxdotdp =
521  rcp_dynamic_cast<const DMVPV>(state->getXDot())->getMultiVector();
522  assign(x_dot_mv->col(0).ptr(), *(frozen_x_dot));
523  assign(x_dot_mv->subView(rng).ptr(), *dxdotdp);
524  x_dot = multiVectorProductVector(prod_space, x_dot_mv);
525  }
526 
527  // X-Dot-Dot
528  RCP<VectorBase<Scalar> > x_dot_dot;
529  if (state->getXDotDot() != Teuchos::null) {
530  RCP< MultiVectorBase<Scalar> > x_dot_dot_mv =
531  createMembers(x_space, num_param+1);
532  RCP<const MultiVectorBase<Scalar> > dxdotdotdp =
533  rcp_dynamic_cast<const DMVPV>(state->getXDotDot())->getMultiVector();
534  assign(x_dot_dot_mv->col(0).ptr(), *(frozen_x_dot_dot));
535  assign(x_dot_dot_mv->subView(rng).ptr(), *dxdotdotdp);
536  x_dot_dot = multiVectorProductVector(prod_space, x_dot_dot_mv);
537  }
538 
539  RCP<SolutionState<Scalar> > prod_state =
540  rcp(new SolutionState<Scalar>(state->getMetaData()->clone(),
541  x, x_dot, x_dot_dot,
542  state->getStepperState()->clone()));
543  solutionHistory_->addState(prod_state);
544  }
545 }
546 
547 /// Non-member constructor
548 template<class Scalar>
549 Teuchos::RCP<Tempus::IntegratorPseudoTransientForwardSensitivity<Scalar> >
551  Teuchos::RCP<Teuchos::ParameterList> pList,
552  const Teuchos::RCP<Thyra::ModelEvaluator<Scalar> >& model)
553 {
554  Teuchos::RCP<Tempus::IntegratorPseudoTransientForwardSensitivity<Scalar> > integrator =
555  Teuchos::rcp(new Tempus::IntegratorPseudoTransientForwardSensitivity<Scalar>(pList, model));
556  return(integrator);
557 }
558 
559 /// Non-member constructor
560 template<class Scalar>
561 Teuchos::RCP<Tempus::IntegratorPseudoTransientForwardSensitivity<Scalar> >
563  const Teuchos::RCP<Thyra::ModelEvaluator<Scalar> >& model,
564  std::string stepperType)
565 {
566  Teuchos::RCP<Tempus::IntegratorPseudoTransientForwardSensitivity<Scalar> > integrator =
567  Teuchos::rcp(new Tempus::IntegratorPseudoTransientForwardSensitivity<Scalar>(model, stepperType));
568  return(integrator);
569 }
570 
571 /// Non-member constructor
572 template<class Scalar>
573 Teuchos::RCP<Tempus::IntegratorPseudoTransientForwardSensitivity<Scalar> >
575 {
576  Teuchos::RCP<Tempus::IntegratorPseudoTransientForwardSensitivity<Scalar> > integrator =
578  return(integrator);
579 }
580 
581 } // namespace Tempus
582 #endif // Tempus_IntegratorPseudoTransientForwardSensitivity_impl_hpp
virtual Teuchos::RCP< const Thyra::MultiVectorBase< Scalar > > getDxdotDp() const
virtual Teuchos::RCP< Stepper< Scalar > > getStepper() const override
Get the Stepper.
void setParameterList(const Teuchos::RCP< Teuchos::ParameterList > &pl) override
virtual Teuchos::RCP< const SolutionHistory< Scalar > > getSolutionHistory() const override
Get the SolutionHistory.
virtual Teuchos::RCP< const Thyra::MultiVectorBase< Scalar > > getDxDp() const
virtual Teuchos::RCP< const Thyra::MultiVectorBase< Scalar > > getDxdotdotDp() const
Teuchos::RCP< SensitivityModelEvaluatorBase< Scalar > > wrapStaggeredFSAModelEvaluator(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &model, const Teuchos::RCP< const Teuchos::ParameterList > &pList=Teuchos::null)
virtual Teuchos::RCP< TimeStepControl< Scalar > > getNonConstTimeStepControl() override
Teuchos::RCP< Tempus::IntegratorPseudoTransientForwardSensitivity< Scalar > > integratorPseudoTransientForwardSensitivity(Teuchos::RCP< Teuchos::ParameterList > pList, const Teuchos::RCP< Thyra::ModelEvaluator< Scalar > > &model)
Non-member constructor.
virtual void initializeSolutionHistory(Scalar t0, Teuchos::RCP< const Thyra::VectorBase< Scalar > > x0, Teuchos::RCP< const Thyra::VectorBase< Scalar > > xdot0=Teuchos::null, Teuchos::RCP< const Thyra::VectorBase< Scalar > > xdotdot0=Teuchos::null, Teuchos::RCP< const Thyra::MultiVectorBase< Scalar > > DxDp0=Teuchos::null, Teuchos::RCP< const Thyra::MultiVectorBase< Scalar > > DxdotDp0=Teuchos::null, Teuchos::RCP< const Thyra::MultiVectorBase< Scalar > > DxdotdotDp0=Teuchos::null)
Set the initial state from Thyra::VectorBase(s)
virtual bool advanceTime()
Advance the solution to timeMax, and return true if successful.
Status
Status for the Integrator, the Stepper and the SolutionState.
void describe(Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel) const override
virtual Teuchos::RCP< Teuchos::ParameterList > getTempusParameterList() override
Return a copy of the Tempus ParameterList.
Teuchos::RCP< const Teuchos::ParameterList > getValidParameters() const override
SolutionHistory is basically a container of SolutionStates. SolutionHistory maintains a collection of...
virtual Teuchos::RCP< const Thyra::VectorBase< Scalar > > getXdot() const
Get current the time derivative of the solution, xdot.
Teuchos::RCP< SensitivityModelEvaluatorBase< Scalar > > createSensitivityModel(const Teuchos::RCP< Thyra::ModelEvaluator< Scalar > > &model, const Teuchos::RCP< Teuchos::ParameterList > &inputPL)
virtual Teuchos::RCP< const Thyra::VectorBase< Scalar > > getXdotdot() const
Get current the second time derivative of the solution, xdotdot.
Time integrator suitable for pseudotransient forward sensitivity analysis.
virtual void setTempusParameterList(Teuchos::RCP< Teuchos::ParameterList > pl) override
virtual Teuchos::RCP< const TimeStepControl< Scalar > > getTimeStepControl() const override
Get the TimeStepControl.
virtual Teuchos::RCP< const Thyra::VectorBase< Scalar > > getX() const
Get current the solution, x.
Solution state for integrators and steppers. SolutionState contains the metadata for solutions and th...