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 Scalar
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>
189  Teuchos::RCP<const Thyra::VectorBase<Scalar> > x0,
190  Teuchos::RCP<const Thyra::VectorBase<Scalar> > xdot0,
191  Teuchos::RCP<const Thyra::VectorBase<Scalar> > xdotdot0,
192  Teuchos::RCP<const Thyra::MultiVectorBase<Scalar> > DxDp0,
193  Teuchos::RCP<const Thyra::MultiVectorBase<Scalar> > DxdotDp0,
194  Teuchos::RCP<const Thyra::MultiVectorBase<Scalar> > DxdotdotDp0)
195 {
196  using Teuchos::RCP;
197  using Teuchos::rcp_dynamic_cast;
198  using Thyra::VectorSpaceBase;
199  using Thyra::assign;
200  using Thyra::createMember;
201  typedef Thyra::DefaultMultiVectorProductVector<Scalar> DMVPV;
202 
203  //
204  // Create and initialize product X, Xdot, Xdotdot
205 
206  RCP< const VectorSpaceBase<Scalar> > space = sens_model_->get_x_space();
207  RCP<DMVPV> X = rcp_dynamic_cast<DMVPV>(createMember(space));
208  RCP<DMVPV> Xdot = rcp_dynamic_cast<DMVPV>(createMember(space));
209  RCP<DMVPV> Xdotdot = rcp_dynamic_cast<DMVPV>(createMember(space));
210  const Scalar zero = Teuchos::ScalarTraits<Scalar>::zero();
211 
212  // x
213  if (DxDp0 == Teuchos::null)
214  assign(X->getNonconstMultiVector().ptr(), zero);
215  else
216  assign(X->getNonconstMultiVector().ptr(), *DxDp0);
217 
218  // xdot
219  if (DxdotDp0 == Teuchos::null)
220  assign(Xdot->getNonconstMultiVector().ptr(), zero);
221  else
222  assign(Xdot->getNonconstMultiVector().ptr(), *DxdotDp0);
223 
224  // xdotdot
225  if (DxdotDp0 == Teuchos::null)
226  assign(Xdotdot->getNonconstMultiVector().ptr(), zero);
227  else
228  assign(Xdotdot->getNonconstMultiVector().ptr(), *DxdotdotDp0);
229 
230  state_integrator_->initializeSolutionHistory(t0, x0, xdot0, xdotdot0);
231  sens_integrator_->initializeSolutionHistory(t0, X, Xdot, Xdotdot);
232 }
233 
234 template<class Scalar>
235 Teuchos::RCP<const Thyra::VectorBase<Scalar> >
237 getX() const
238 {
239  using Teuchos::RCP;
240  using Teuchos::rcp_dynamic_cast;
241  typedef Thyra::DefaultMultiVectorProductVector<Scalar> DMVPV;
242 
243  RCP<const DMVPV> X =
244  rcp_dynamic_cast<const DMVPV>(solutionHistory_->getCurrentState()->getX());
245  return X->getMultiVector()->col(0);
246 }
247 
248 template<class Scalar>
249 Teuchos::RCP<const Thyra::MultiVectorBase<Scalar> >
251 getDxDp() const
252 {
253  using Teuchos::RCP;
254  using Teuchos::rcp_dynamic_cast;
255  typedef Thyra::DefaultMultiVectorProductVector<Scalar> DMVPV;
256 
257  RCP<const DMVPV> X =
258  rcp_dynamic_cast<const DMVPV>(solutionHistory_->getCurrentState()->getX());
259  const int num_param = X->getMultiVector()->domain()->dim()-1;
260  const Teuchos::Range1D rng(1,num_param);
261  return X->getMultiVector()->subView(rng);
262 }
263 
264 template<class Scalar>
265 Teuchos::RCP<const Thyra::VectorBase<Scalar> >
267 getXdot() const
268 {
269  using Teuchos::RCP;
270  using Teuchos::rcp_dynamic_cast;
271  typedef Thyra::DefaultMultiVectorProductVector<Scalar> DMVPV;
272 
273  RCP<const DMVPV> Xdot =
274  rcp_dynamic_cast<const DMVPV>(solutionHistory_->getCurrentState()->getXDot());
275  return Xdot->getMultiVector()->col(0);
276 }
277 
278 template<class Scalar>
279 Teuchos::RCP<const Thyra::MultiVectorBase<Scalar> >
281 getDxdotDp() const
282 {
283  using Teuchos::RCP;
284  using Teuchos::rcp_dynamic_cast;
285  typedef Thyra::DefaultMultiVectorProductVector<Scalar> DMVPV;
286 
287  RCP<const DMVPV> Xdot =
288  rcp_dynamic_cast<const DMVPV>(solutionHistory_->getCurrentState()->getXDot());
289  const int num_param = Xdot->getMultiVector()->domain()->dim()-1;
290  const Teuchos::Range1D rng(1,num_param);
291  return Xdot->getMultiVector()->subView(rng);
292 }
293 
294 template<class Scalar>
295 Teuchos::RCP<const Thyra::VectorBase<Scalar> >
297 getXdotdot() const
298 {
299  using Teuchos::RCP;
300  using Teuchos::rcp_dynamic_cast;
301  typedef Thyra::DefaultMultiVectorProductVector<Scalar> DMVPV;
302 
303  RCP<const DMVPV> Xdotdot =
304  rcp_dynamic_cast<const DMVPV>(solutionHistory_->getCurrentState()->getXDotDot());
305  return Xdotdot->getMultiVector()->col(0);
306 }
307 
308 template<class Scalar>
309 Teuchos::RCP<const Thyra::MultiVectorBase<Scalar> >
312 {
313  using Teuchos::RCP;
314  using Teuchos::rcp_dynamic_cast;
315  typedef Thyra::DefaultMultiVectorProductVector<Scalar> DMVPV;
316 
317  RCP<const DMVPV> Xdotdot =
318  rcp_dynamic_cast<const DMVPV>(solutionHistory_->getCurrentState()->getXDotDot());
319  const int num_param = Xdotdot->getMultiVector()->domain()->dim()-1;
320  const Teuchos::Range1D rng(1,num_param);
321  return Xdotdot->getMultiVector()->subView(rng);
322 }
323 
324 template<class Scalar>
325 std::string
327 description() const
328 {
329  std::string name = "Tempus::IntegratorPseudoTransientForwardSensitivity";
330  return(name);
331 }
332 
333 template<class Scalar>
334 void
337  Teuchos::FancyOStream &out,
338  const Teuchos::EVerbosityLevel verbLevel) const
339 {
340  out << description() << "::describe" << std::endl;
341  state_integrator_->describe(out, verbLevel);
342  sens_integrator_->describe(out, verbLevel);
343 }
344 
345 template<class Scalar>
346 void
348 setParameterList(const Teuchos::RCP<Teuchos::ParameterList> & inputPL)
349 {
350  state_integrator_->setParameterList(inputPL);
351  sens_integrator_->setParameterList(inputPL);
352  reuse_solver_ =
353  inputPL->sublist("Sensitivities").get("Reuse State Linear Solver", false);
354  force_W_update_ =
355  inputPL->sublist("Sensitivities").get("Force W Update", false);
356 }
357 
358 template<class Scalar>
359 Teuchos::RCP<Teuchos::ParameterList>
362 {
363  state_integrator_->unsetParameterList();
364  return sens_integrator_->unsetParameterList();
365 }
366 
367 template<class Scalar>
368 Teuchos::RCP<const Teuchos::ParameterList>
371 {
372  Teuchos::RCP<Teuchos::ParameterList> pl =
373  Teuchos::rcp(new Teuchos::ParameterList);
374  Teuchos::RCP<const Teuchos::ParameterList> integrator_pl =
375  state_integrator_->getValidParameters();
376  Teuchos::RCP<const Teuchos::ParameterList> sensitivity_pl =
378  pl->setParameters(*integrator_pl);
379  pl->sublist("Sensitivities").setParameters(*sensitivity_pl);
380  pl->sublist("Sensitivities").set("Reuse State Linear Solver", false);
381  pl->sublist("Sensitivities").set("Force W Update", false);
382 
383  return pl;
384 }
385 
386 template<class Scalar>
387 Teuchos::RCP<Teuchos::ParameterList>
390 {
391  return state_integrator_->getNonconstParameterList();
392 }
393 
394 template <class Scalar>
395 Teuchos::RCP<SensitivityModelEvaluatorBase<Scalar> >
398  const Teuchos::RCP<Thyra::ModelEvaluator<Scalar> >& model,
399  const Teuchos::RCP<Teuchos::ParameterList>& inputPL)
400 {
401  using Teuchos::rcp;
402 
403  Teuchos::RCP<Teuchos::ParameterList> pl = Teuchos::parameterList();
404  if (inputPL != Teuchos::null) {
405  *pl = inputPL->sublist("Sensitivities");
406  }
407  reuse_solver_ = pl->get("Reuse State Linear Solver", false);
408  force_W_update_ = pl->get("Force W Update", true);
409  pl->remove("Reuse State Linear Solver");
410  pl->remove("Force W Update");
411  return wrapStaggeredFSAModelEvaluator(model, pl);
412 }
413 
414 template<class Scalar>
415 void
418 {
419  using Teuchos::RCP;
420  using Teuchos::rcp;
421  using Teuchos::rcp_dynamic_cast;
422  using Teuchos::ParameterList;
423  using Thyra::VectorBase;
424  using Thyra::MultiVectorBase;
425  using Thyra::VectorSpaceBase;
426  using Thyra::createMembers;
427  using Thyra::multiVectorProductVector;
428  using Thyra::assign;
429  typedef Thyra::DefaultMultiVectorProductVector<Scalar> DMVPV;
430 
431  // Create combined solution histories, first for the states with zero
432  // sensitivities and then for the sensitivities with frozen states
433  RCP<ParameterList> shPL =
434  Teuchos::sublist(state_integrator_->getIntegratorParameterList(),
435  "Solution History", true);
436  solutionHistory_ = rcp(new SolutionHistory<Scalar>(shPL));
437 
438  const int num_param =
439  rcp_dynamic_cast<const DMVPV>(sens_integrator_->getX())->getMultiVector()->domain()->dim();
440  RCP<const VectorSpaceBase<Scalar> > x_space = model_->get_x_space();
441  RCP<const Thyra::DefaultMultiVectorProductVectorSpace<Scalar> > prod_space =
442  Thyra::multiVectorProductVectorSpace(x_space, num_param+1);
443  const Teuchos::Range1D rng(1,num_param);
444  const Scalar zero = Teuchos::ScalarTraits<Scalar>::zero();
445 
446  RCP<const SolutionHistory<Scalar> > state_solution_history =
447  state_integrator_->getSolutionHistory();
448  int num_states = state_solution_history->getNumStates();
449  for (int i=0; i<num_states; ++i) {
450  RCP<const SolutionState<Scalar> > state = (*state_solution_history)[i];
451 
452  // X
453  RCP< MultiVectorBase<Scalar> > x_mv =
454  createMembers(x_space, num_param+1);
455  assign(x_mv->col(0).ptr(), *(state->getX()));
456  assign(x_mv->subView(rng).ptr(), zero);
457  RCP<VectorBase<Scalar> > x = multiVectorProductVector(prod_space, x_mv);
458 
459  // X-Dot
460  RCP<VectorBase<Scalar> > x_dot;
461  if (state->getXDot() != Teuchos::null) {
462  RCP< MultiVectorBase<Scalar> > x_dot_mv =
463  createMembers(x_space, num_param+1);
464  assign(x_dot_mv->col(0).ptr(), *(state->getXDot()));
465  assign(x_dot_mv->subView(rng).ptr(), zero);
466  x_dot = multiVectorProductVector(prod_space, x_dot_mv);
467  }
468 
469  // X-Dot-Dot
470  RCP<VectorBase<Scalar> > x_dot_dot;
471  if (state->getXDotDot() != Teuchos::null) {
472  RCP< MultiVectorBase<Scalar> > x_dot_dot_mv =
473  createMembers(x_space, num_param+1);
474  assign(x_dot_dot_mv->col(0).ptr(), *(state->getXDotDot()));
475  assign(x_dot_dot_mv->subView(rng).ptr(), zero);
476  x_dot_dot = multiVectorProductVector(prod_space, x_dot_dot_mv);
477  }
478 
479  RCP<SolutionState<Scalar> > prod_state =
480  rcp(new SolutionState<Scalar>(state->getMetaData()->clone(),
481  x, x_dot, x_dot_dot,
482  state->getStepperState()->clone()));
483  solutionHistory_->addState(prod_state);
484  }
485 
486  RCP<const VectorBase<Scalar> > frozen_x =
487  state_solution_history->getCurrentState()->getX();
488  RCP<const VectorBase<Scalar> > frozen_x_dot =
489  state_solution_history->getCurrentState()->getXDot();
490  RCP<const VectorBase<Scalar> > frozen_x_dot_dot =
491  state_solution_history->getCurrentState()->getXDotDot();
492  RCP<const SolutionHistory<Scalar> > sens_solution_history =
493  sens_integrator_->getSolutionHistory();
494  num_states = sens_solution_history->getNumStates();
495  for (int i=0; i<num_states; ++i) {
496  RCP<const SolutionState<Scalar> > state = (*sens_solution_history)[i];
497 
498  // X
499  RCP< MultiVectorBase<Scalar> > x_mv =
500  createMembers(x_space, num_param+1);
501  RCP<const MultiVectorBase<Scalar> > dxdp =
502  rcp_dynamic_cast<const DMVPV>(state->getX())->getMultiVector();
503  assign(x_mv->col(0).ptr(), *(frozen_x));
504  assign(x_mv->subView(rng).ptr(), *dxdp);
505  RCP<VectorBase<Scalar> > x = multiVectorProductVector(prod_space, x_mv);
506 
507  // X-Dot
508  RCP<VectorBase<Scalar> > x_dot;
509  if (state->getXDot() != Teuchos::null) {
510  RCP< MultiVectorBase<Scalar> > x_dot_mv =
511  createMembers(x_space, num_param+1);
512  RCP<const MultiVectorBase<Scalar> > dxdotdp =
513  rcp_dynamic_cast<const DMVPV>(state->getXDot())->getMultiVector();
514  assign(x_dot_mv->col(0).ptr(), *(frozen_x_dot));
515  assign(x_dot_mv->subView(rng).ptr(), *dxdotdp);
516  x_dot = multiVectorProductVector(prod_space, x_dot_mv);
517  }
518 
519  // X-Dot-Dot
520  RCP<VectorBase<Scalar> > x_dot_dot;
521  if (state->getXDotDot() != Teuchos::null) {
522  RCP< MultiVectorBase<Scalar> > x_dot_dot_mv =
523  createMembers(x_space, num_param+1);
524  RCP<const MultiVectorBase<Scalar> > dxdotdotdp =
525  rcp_dynamic_cast<const DMVPV>(state->getXDotDot())->getMultiVector();
526  assign(x_dot_dot_mv->col(0).ptr(), *(frozen_x_dot_dot));
527  assign(x_dot_dot_mv->subView(rng).ptr(), *dxdotdotdp);
528  x_dot_dot = multiVectorProductVector(prod_space, x_dot_dot_mv);
529  }
530 
531  RCP<SolutionState<Scalar> > prod_state =
532  rcp(new SolutionState<Scalar>(state->getMetaData()->clone(),
533  x, x_dot, x_dot_dot,
534  state->getStepperState()->clone()));
535  solutionHistory_->addState(prod_state);
536  }
537 }
538 
539 /// Non-member constructor
540 template<class Scalar>
541 Teuchos::RCP<Tempus::IntegratorPseudoTransientForwardSensitivity<Scalar> >
543  Teuchos::RCP<Teuchos::ParameterList> pList,
544  const Teuchos::RCP<Thyra::ModelEvaluator<Scalar> >& model)
545 {
546  Teuchos::RCP<Tempus::IntegratorPseudoTransientForwardSensitivity<Scalar> > integrator =
547  Teuchos::rcp(new Tempus::IntegratorPseudoTransientForwardSensitivity<Scalar>(pList, model));
548  return(integrator);
549 }
550 
551 /// Non-member constructor
552 template<class Scalar>
553 Teuchos::RCP<Tempus::IntegratorPseudoTransientForwardSensitivity<Scalar> >
555  const Teuchos::RCP<Thyra::ModelEvaluator<Scalar> >& model,
556  std::string stepperType)
557 {
558  Teuchos::RCP<Tempus::IntegratorPseudoTransientForwardSensitivity<Scalar> > integrator =
559  Teuchos::rcp(new Tempus::IntegratorPseudoTransientForwardSensitivity<Scalar>(model, stepperType));
560  return(integrator);
561 }
562 
563 /// Non-member constructor
564 template<class Scalar>
565 Teuchos::RCP<Tempus::IntegratorPseudoTransientForwardSensitivity<Scalar> >
567 {
568  Teuchos::RCP<Tempus::IntegratorPseudoTransientForwardSensitivity<Scalar> > integrator =
570  return(integrator);
571 }
572 
573 } // namespace Tempus
574 #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)
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...