Tempus
Version of the Day
Time Integration
|
Time integrator implementing forward sensitivity analysis. More...
#include <Tempus_IntegratorForwardSensitivity_decl.hpp>
Public Member Functions | |
IntegratorForwardSensitivity (const Teuchos::RCP< Thyra::ModelEvaluator< Scalar >> &model, const Teuchos::RCP< IntegratorBasic< Scalar >> &integrator, const Teuchos::RCP< SensitivityModelEvaluatorBase< Scalar >> &sens_model, const Teuchos::RCP< StepperStaggeredForwardSensitivity< Scalar >> &sens_stepper, const bool use_combined_method) | |
Full Constructor with model, and will be fully initialized. More... | |
IntegratorForwardSensitivity () | |
Destructor. More... | |
virtual | ~IntegratorForwardSensitivity () |
Destructor. More... | |
void | parseScreenOutput () |
Parse when screen output should be executed. More... | |
SensitivityStepMode | getStepMode () const |
What mode the current time integration step is in. More... | |
Public Member Functions inherited from Tempus::Integrator< Scalar > | |
Public Member Functions inherited from Teuchos::Describable | |
void | describe (std::ostream &out, const EVerbosityLevel verbLevel=verbLevel_default) const |
virtual | ~Describable () |
LabeledObject () | |
virtual | ~LabeledObject () |
virtual void | setObjectLabel (const std::string &objectLabel) |
virtual std::string | getObjectLabel () const |
DescribableStreamManipulatorState | describe (const Describable &describable, const EVerbosityLevel verbLevel=Describable::verbLevel_default) |
std::ostream & | operator<< (std::ostream &os, const DescribableStreamManipulatorState &d) |
Public Member Functions inherited from Teuchos::VerboseObject< Tempus::Integrator< Scalar > > | |
VerboseObject (const EVerbosityLevel verbLevel=VERB_DEFAULT, const RCP< FancyOStream > &oStream=Teuchos::null) | |
virtual const VerboseObject & | setVerbLevel (const EVerbosityLevel verbLevel) const |
virtual const VerboseObject & | setOverridingVerbLevel (const EVerbosityLevel verbLevel) const |
virtual EVerbosityLevel | getVerbLevel () const |
TEUCHOSPARAMETERLIST_LIB_DLL_EXPORT RCP< const ParameterList > | getValidVerboseObjectSublist () |
TEUCHOSPARAMETERLIST_LIB_DLL_EXPORT void | setupVerboseObjectSublist (ParameterList *paramList) |
TEUCHOSPARAMETERLIST_LIB_DLL_EXPORT void | readVerboseObjectSublist (ParameterList *paramList, RCP< FancyOStream > *oStream, EVerbosityLevel *verbLevel) |
void | readVerboseObjectSublist (ParameterList *paramList, VerboseObject< ObjectType > *verboseObject) |
Public Member Functions inherited from Teuchos::VerboseObjectBase | |
virtual | ~VerboseObjectBase () |
VerboseObjectBase (const RCP< FancyOStream > &oStream=Teuchos::null) | |
virtual const VerboseObjectBase & | setOStream (const RCP< FancyOStream > &oStream) const |
virtual const VerboseObjectBase & | setOverridingOStream (const RCP< FancyOStream > &oStream) const |
virtual VerboseObjectBase & | setLinePrefix (const std::string &linePrefix) |
virtual RCP< FancyOStream > | getOStream () const |
virtual RCP< FancyOStream > | getOverridingOStream () const |
virtual std::string | getLinePrefix () const |
virtual OSTab | getOSTab (const int tabs=1, const std::string &linePrefix="") const |
Protected Attributes | |
Teuchos::RCP < Thyra::ModelEvaluator < Scalar > > | model_ |
Teuchos::RCP< IntegratorBasic < Scalar > > | integrator_ |
Teuchos::RCP < SensitivityModelEvaluatorBase < Scalar > > | sens_model_ |
Teuchos::RCP < StepperStaggeredForwardSensitivity < Scalar > > | sens_stepper_ |
bool | use_combined_method_ |
Basic integrator methods | |
virtual bool | advanceTime () |
Advance the solution to timeMax, and return true if successful. More... | |
virtual bool | advanceTime (const Scalar timeFinal) override |
Advance the solution to timeFinal, and return true if successful. More... | |
virtual void | startIntegrator () |
Perform tasks before start of integrator. More... | |
virtual void | startTimeStep () |
Start time step. More... | |
virtual void | checkTimeStep () |
Check if time step has passed or failed. More... | |
virtual void | endIntegrator () |
Perform tasks after end of integrator. More... | |
Accessor methods | |
virtual Scalar | getTime () const override |
Get current time. More... | |
virtual int | getIndex () const override |
Get current index. More... | |
virtual Status | getStatus () const override |
Get Status. More... | |
virtual void | setStatus (const Status st) override |
Set the Status. More... | |
virtual Teuchos::RCP< Stepper < Scalar > > | getStepper () const override |
Get the Stepper. More... | |
virtual void | setStepper (Teuchos::RCP< Thyra::ModelEvaluator< Scalar >> model) |
Set the Stepper. More... | |
virtual void | setStepper (Teuchos::RCP< Stepper< Scalar >> stepper) |
Set the Stepper. More... | |
virtual void | initializeSolutionHistory (Teuchos::RCP< SolutionState< Scalar >> state=Teuchos::null) |
Set the initial state which has the initial conditions. More... | |
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) More... | |
virtual Teuchos::RCP< const SolutionHistory< Scalar > > | getSolutionHistory () const override |
Get the SolutionHistory. More... | |
virtual Teuchos::RCP < SolutionHistory< Scalar > > | getNonConstSolutionHistory () override |
Get the SolutionHistory. More... | |
virtual void | setSolutionHistory (Teuchos::RCP< SolutionHistory< Scalar >> sh=Teuchos::null) |
Set the SolutionHistory. More... | |
virtual Teuchos::RCP< const TimeStepControl< Scalar > > | getTimeStepControl () const override |
Get the TimeStepControl. More... | |
virtual Teuchos::RCP < TimeStepControl< Scalar > > | getNonConstTimeStepControl () override |
virtual void | setTimeStepControl (Teuchos::RCP< TimeStepControl< Scalar >> tsc=Teuchos::null) |
Set the TimeStepControl. More... | |
virtual Teuchos::RCP < IntegratorObserver< Scalar > > | getObserver () |
Get the Observer. More... | |
virtual void | setObserver (Teuchos::RCP< IntegratorObserver< Scalar >> obs=Teuchos::null) |
Set the Observer. More... | |
virtual void | initialize () |
Initializes the Integrator after set* function calls. More... | |
virtual Teuchos::RCP < Teuchos::Time > | getIntegratorTimer () const override |
Returns the IntegratorTimer_ for this Integrator. More... | |
virtual Teuchos::RCP < Teuchos::Time > | getStepperTimer () const override |
virtual Teuchos::RCP< const Thyra::VectorBase< Scalar > > | getX () const |
Get the current solution, x, only. If looking for the solution vector and the sensitivities, use SolutionState->getX() which will return a Block MultiVector with the first block containing the current solution, x, and the remaining blocks are the forward sensitivities . More... | |
virtual Teuchos::RCP< const Thyra::MultiVectorBase< Scalar > > | getDxDp () const |
Get the forward sensitivities . More... | |
virtual Teuchos::RCP< const Thyra::VectorBase< Scalar > > | getXDot () const |
Get current the time derivative of the solution, xdot, only. This is the first block only and not the full Block MultiVector. More... | |
virtual Teuchos::RCP< const Thyra::MultiVectorBase< Scalar > > | getDXDotDp () const |
virtual Teuchos::RCP< const Thyra::VectorBase< Scalar > > | getXDotDot () const |
Get current the second time derivative of the solution, xdotdot, only. This is the first block only and not the full Block MultiVector. More... | |
virtual Teuchos::RCP< const Thyra::MultiVectorBase< Scalar > > | getDXDotDotDp () const |
virtual Teuchos::RCP< const Thyra::VectorBase< Scalar > > | getG () const |
Return response function g. More... | |
virtual Teuchos::RCP< const Thyra::MultiVectorBase< Scalar > > | getDgDp () const |
Return forward sensitivity stored in Jacobian format. More... | |
virtual Teuchos::RCP < SolutionState< Scalar > > | getCurrentState () |
Get current state. More... | |
Overridden from Teuchos::Describable | |
std::string | description () const override |
void | describe (Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel) const override |
Additional Inherited Members | |
Static Public Member Functions inherited from Teuchos::VerboseObject< Tempus::Integrator< Scalar > > | |
static void | setDefaultVerbLevel (const EVerbosityLevel defaultVerbLevel) |
static EVerbosityLevel | getDefaultVerbLevel () |
Static Public Member Functions inherited from Teuchos::VerboseObjectBase | |
static void | setDefaultOStream (const RCP< FancyOStream > &defaultOStream) |
static RCP< FancyOStream > | getDefaultOStream () |
Static Public Attributes inherited from Teuchos::Describable | |
static const EVerbosityLevel | verbLevel_default |
Protected Member Functions inherited from Teuchos::VerboseObject< Tempus::Integrator< Scalar > > | |
void | initializeVerboseObject (const EVerbosityLevel verbLevel=VERB_DEFAULT, const RCP< FancyOStream > &oStream=Teuchos::null) |
Protected Member Functions inherited from Teuchos::VerboseObjectBase | |
void | initializeVerboseObjectBase (const RCP< FancyOStream > &oStream=Teuchos::null) |
virtual void | informUpdatedVerbosityState () const |
Time integrator implementing forward sensitivity analysis.
This integrator implements forward parameter sensitivity analysis by propagating the derivative of the solution with respect to model parameters alongside the solution. It supports sensitivity propagation methods:
Note that this integrator implements all of the same functions as the IntegratorBasic, but is not derived from IntegratorBasic. It also provides functions for setting the sensitivity initial conditions and extracting the sensitivity at the final time. One should use the getX() and getDxDp() methods for extracting the final solution and its parameter sensitivity as a multi-vector. This data can also be extracted from the solution history, but is stored as a Thyra product vector which requires knowledge of the internal implementation.
Definition at line 49 of file Tempus_IntegratorForwardSensitivity_decl.hpp.
Tempus::IntegratorForwardSensitivity< Scalar >::IntegratorForwardSensitivity | ( | const Teuchos::RCP< Thyra::ModelEvaluator< Scalar >> & | model, |
const Teuchos::RCP< IntegratorBasic< Scalar >> & | integrator, | ||
const Teuchos::RCP< SensitivityModelEvaluatorBase< Scalar >> & | sens_model, | ||
const Teuchos::RCP< StepperStaggeredForwardSensitivity< Scalar >> & | sens_stepper, | ||
const bool | use_combined_method | ||
) |
Full Constructor with model, and will be fully initialized.
[in] | model | The forward physics ModelEvaluator |
[in] | integrator | Forward state Integrator |
[in] | sens_model | The sensitivity ModelEvaluator |
[in] | sens_stepper | Tempus stepper for the sensitivity integration |
[in] | use_combined_method | Indicates whether or not to use the "Combined" sensitivity method |
In addition to all of the regular integrator options, the supplied parameter list supports the following options contained within a sublist "Sensitivities" from the top-level parameter list:
Definition at line 24 of file Tempus_IntegratorForwardSensitivity_impl.hpp.
Tempus::IntegratorForwardSensitivity< Scalar >::IntegratorForwardSensitivity | ( | ) |
Destructor.
Constructor that requires a subsequent setStepper, and initialize calls.
Definition at line 41 of file Tempus_IntegratorForwardSensitivity_impl.hpp.
|
inlinevirtual |
Destructor.
Definition at line 103 of file Tempus_IntegratorForwardSensitivity_decl.hpp.
|
inlinevirtual |
Advance the solution to timeMax, and return true if successful.
Definition at line 108 of file Tempus_IntegratorForwardSensitivity_decl.hpp.
|
inlineoverridevirtual |
Advance the solution to timeFinal, and return true if successful.
Implements Tempus::Integrator< Scalar >.
Definition at line 110 of file Tempus_IntegratorForwardSensitivity_decl.hpp.
|
inlinevirtual |
Perform tasks before start of integrator.
Definition at line 115 of file Tempus_IntegratorForwardSensitivity_decl.hpp.
|
inlinevirtual |
Start time step.
Definition at line 117 of file Tempus_IntegratorForwardSensitivity_decl.hpp.
|
inlinevirtual |
Check if time step has passed or failed.
Definition at line 119 of file Tempus_IntegratorForwardSensitivity_decl.hpp.
|
inlinevirtual |
Perform tasks after end of integrator.
Definition at line 121 of file Tempus_IntegratorForwardSensitivity_decl.hpp.
|
inlineoverridevirtual |
Get current time.
Implements Tempus::Integrator< Scalar >.
Definition at line 127 of file Tempus_IntegratorForwardSensitivity_decl.hpp.
|
inlineoverridevirtual |
Get current index.
Implements Tempus::Integrator< Scalar >.
Definition at line 129 of file Tempus_IntegratorForwardSensitivity_decl.hpp.
|
inlineoverridevirtual |
Get Status.
Implements Tempus::Integrator< Scalar >.
Definition at line 131 of file Tempus_IntegratorForwardSensitivity_decl.hpp.
|
inlineoverridevirtual |
Set the Status.
Implements Tempus::Integrator< Scalar >.
Definition at line 133 of file Tempus_IntegratorForwardSensitivity_decl.hpp.
|
inlineoverridevirtual |
Get the Stepper.
Implements Tempus::Integrator< Scalar >.
Definition at line 138 of file Tempus_IntegratorForwardSensitivity_decl.hpp.
|
virtual |
Set the Stepper.
Definition at line 48 of file Tempus_IntegratorForwardSensitivity_impl.hpp.
|
inlinevirtual |
Set the Stepper.
Definition at line 147 of file Tempus_IntegratorForwardSensitivity_decl.hpp.
|
inlinevirtual |
Set the initial state which has the initial conditions.
Definition at line 152 of file Tempus_IntegratorForwardSensitivity_decl.hpp.
|
virtual |
Set the initial state from Thyra::VectorBase(s)
Definition at line 58 of file Tempus_IntegratorForwardSensitivity_impl.hpp.
|
inlineoverridevirtual |
Get the SolutionHistory.
Implements Tempus::Integrator< Scalar >.
Definition at line 170 of file Tempus_IntegratorForwardSensitivity_decl.hpp.
|
inlineoverridevirtual |
Get the SolutionHistory.
Implements Tempus::Integrator< Scalar >.
Definition at line 176 of file Tempus_IntegratorForwardSensitivity_decl.hpp.
|
inlinevirtual |
Set the SolutionHistory.
Definition at line 182 of file Tempus_IntegratorForwardSensitivity_decl.hpp.
|
inlineoverridevirtual |
Get the TimeStepControl.
Implements Tempus::Integrator< Scalar >.
Definition at line 188 of file Tempus_IntegratorForwardSensitivity_decl.hpp.
|
inlineoverridevirtual |
Implements Tempus::Integrator< Scalar >.
Definition at line 193 of file Tempus_IntegratorForwardSensitivity_decl.hpp.
|
inlinevirtual |
Set the TimeStepControl.
Definition at line 199 of file Tempus_IntegratorForwardSensitivity_decl.hpp.
|
inlinevirtual |
Get the Observer.
Definition at line 205 of file Tempus_IntegratorForwardSensitivity_decl.hpp.
|
inlinevirtual |
Set the Observer.
Definition at line 210 of file Tempus_IntegratorForwardSensitivity_decl.hpp.
|
inlinevirtual |
Initializes the Integrator after set* function calls.
Definition at line 216 of file Tempus_IntegratorForwardSensitivity_decl.hpp.
|
inlineoverridevirtual |
Returns the IntegratorTimer_ for this Integrator.
Implements Tempus::Integrator< Scalar >.
Definition at line 217 of file Tempus_IntegratorForwardSensitivity_decl.hpp.
|
inlineoverridevirtual |
Implements Tempus::Integrator< Scalar >.
Definition at line 221 of file Tempus_IntegratorForwardSensitivity_decl.hpp.
|
virtual |
Get the current solution, x, only. If looking for the solution vector and the sensitivities, use SolutionState->getX()
which will return a Block MultiVector with the first block containing the current solution, x, and the remaining blocks are the forward sensitivities .
Use getDxDp
to get the forward sensitivities only.
Definition at line 121 of file Tempus_IntegratorForwardSensitivity_impl.hpp.
|
virtual |
Get the forward sensitivities .
Definition at line 133 of file Tempus_IntegratorForwardSensitivity_impl.hpp.
|
virtual |
Get current the time derivative of the solution, xdot, only. This is the first block only and not the full Block MultiVector.
Definition at line 147 of file Tempus_IntegratorForwardSensitivity_impl.hpp.
|
virtual |
Definition at line 159 of file Tempus_IntegratorForwardSensitivity_impl.hpp.
|
virtual |
Get current the second time derivative of the solution, xdotdot, only. This is the first block only and not the full Block MultiVector.
Use getDXDotDp
to get the forward sensitivities.
Definition at line 173 of file Tempus_IntegratorForwardSensitivity_impl.hpp.
|
virtual |
Definition at line 186 of file Tempus_IntegratorForwardSensitivity_impl.hpp.
|
virtual |
Return response function g.
Definition at line 201 of file Tempus_IntegratorForwardSensitivity_impl.hpp.
|
virtual |
Return forward sensitivity stored in Jacobian format.
Definition at line 231 of file Tempus_IntegratorForwardSensitivity_impl.hpp.
|
inlinevirtual |
Get current state.
Definition at line 266 of file Tempus_IntegratorForwardSensitivity_decl.hpp.
|
inline |
Parse when screen output should be executed.
Definition at line 273 of file Tempus_IntegratorForwardSensitivity_decl.hpp.
|
overridevirtual |
Reimplemented from Teuchos::Describable.
Definition at line 262 of file Tempus_IntegratorForwardSensitivity_impl.hpp.
|
overridevirtual |
Reimplemented from Teuchos::Describable.
Definition at line 269 of file Tempus_IntegratorForwardSensitivity_impl.hpp.
SensitivityStepMode Tempus::IntegratorForwardSensitivity< Scalar >::getStepMode | ( | ) | const |
What mode the current time integration step is in.
Definition at line 281 of file Tempus_IntegratorForwardSensitivity_impl.hpp.
|
protected |
Definition at line 286 of file Tempus_IntegratorForwardSensitivity_decl.hpp.
|
protected |
Definition at line 287 of file Tempus_IntegratorForwardSensitivity_decl.hpp.
|
protected |
Definition at line 288 of file Tempus_IntegratorForwardSensitivity_decl.hpp.
|
protected |
Definition at line 289 of file Tempus_IntegratorForwardSensitivity_decl.hpp.
|
protected |
Definition at line 290 of file Tempus_IntegratorForwardSensitivity_decl.hpp.