|
Tempus
Version of the Day
Time Integration
|
Solution state for integrators and steppers. SolutionState contains the metadata for solutions and the solutions themselves. More...
#include <Tempus_SolutionState_decl.hpp>
Public Member Functions | |
| SolutionState (const Teuchos::RCP< Thyra::VectorBase< Scalar > > &x, const Teuchos::RCP< Thyra::VectorBase< Scalar > > &xdot=Teuchos::null, const Teuchos::RCP< Thyra::VectorBase< Scalar > > &xddot=Teuchos::null, const Teuchos::RCP< StepperState< Scalar > > &stepperState=Teuchos::null, const Teuchos::RCP< PhysicsState< Scalar > > &physicsState=Teuchos::null) | |
| SolutionState (const Teuchos::RCP< const Thyra::VectorBase< Scalar > > &x, const Teuchos::RCP< const Thyra::VectorBase< Scalar > > &xdot=Teuchos::null, const Teuchos::RCP< const Thyra::VectorBase< Scalar > > &xddot=Teuchos::null, const Teuchos::RCP< const StepperState< Scalar > > &stepperSt=Teuchos::null, const Teuchos::RCP< const PhysicsState< Scalar > > &physicsSt=Teuchos::null) | |
| SolutionState (const Teuchos::RCP< SolutionStateMetaData< Scalar > > ssmd, const Teuchos::RCP< Thyra::VectorBase< Scalar > > &x, const Teuchos::RCP< Thyra::VectorBase< Scalar > > &xdot, const Teuchos::RCP< Thyra::VectorBase< Scalar > > &xdotdot, const Teuchos::RCP< StepperState< Scalar > > &stepperState, const Teuchos::RCP< PhysicsState< Scalar > > &physicsState=Teuchos::null) | |
| SolutionState (const Teuchos::RCP< const SolutionStateMetaData< Scalar > > ssmd, const Teuchos::RCP< const Thyra::VectorBase< Scalar > > &x, const Teuchos::RCP< const Thyra::VectorBase< Scalar > > &xdot, const Teuchos::RCP< const Thyra::VectorBase< Scalar > > &xdotdot, const Teuchos::RCP< const StepperState< Scalar > > &stepperState, const Teuchos::RCP< const PhysicsState< Scalar > > &physicsState=Teuchos::null) | |
| SolutionState (const Scalar time, const Scalar dt, const int iStep, const Scalar errorAbs, const Scalar errorRel, const int order, const int nFailures, const int nRunningFailures, const int nConsecutiveFailures, const Status solutionStatus, const bool output, const bool outputScreen, const bool isSynced, const bool isInterpolated, const Scalar accuracy, const Teuchos::RCP< Thyra::VectorBase< Scalar > > &x, const Teuchos::RCP< Thyra::VectorBase< Scalar > > &xdot, const Teuchos::RCP< Thyra::VectorBase< Scalar > > &xdotdot, const Teuchos::RCP< StepperState< Scalar > > &stepperState=Teuchos::null, const Teuchos::RCP< PhysicsState< Scalar > > &physicsState=Teuchos::null) | |
| SolutionState (const Scalar time, const Scalar dt, const int iStep, const Scalar errorAbs, const Scalar errorRel, const int order, const int nFailures, const int nRunningFailures, const int nConsecutiveFailures, const Status solutionStatus, const bool output, const bool outputScreen, const bool isSynced, const bool isInterpolated, const Scalar accuracy, const Teuchos::RCP< const Thyra::VectorBase< Scalar > > &x, const Teuchos::RCP< const Thyra::VectorBase< Scalar > > &xdot, const Teuchos::RCP< const Thyra::VectorBase< Scalar > > &xdotdot, const Teuchos::RCP< const StepperState< Scalar > > &stepperSt=Teuchos::null, const Teuchos::RCP< const PhysicsState< Scalar > > &physicsSt=Teuchos::null) | |
| SolutionState (const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &model, const Teuchos::RCP< StepperState< Scalar > > &stepperState=Teuchos::null, const Teuchos::RCP< PhysicsState< Scalar > > &physicsState=Teuchos::null) | |
| SolutionState (const SolutionState< Scalar > &ss) | |
| This is a shallow copy constructor, use clone for a deep copy constructor. More... | |
| virtual Teuchos::RCP< SolutionState< Scalar > > | clone () const |
| This is a deep copy constructor. More... | |
| virtual void | copy (const Teuchos::RCP< const SolutionState< Scalar > > &ss) |
| This is a deep copy. More... | |
| virtual void | copySolutionData (const Teuchos::RCP< const SolutionState< Scalar > > &s) |
| Deep copy solution data, but keep metaData untouched. More... | |
| virtual void | swapSolutionData (const Teuchos::RCP< SolutionState< Scalar > > &ss) |
| Swap solution data, but keep metaData untouched. More... | |
| virtual | ~SolutionState () |
| Destructor. More... | |
Get MetaData values | |
| virtual Teuchos::RCP< const SolutionStateMetaData< Scalar > > | getMetaData () const |
| virtual Teuchos::RCP< SolutionStateMetaData< Scalar > > | getMetaData () |
| virtual Scalar | getTime () const |
| virtual Scalar | getIndex () const |
| virtual Scalar | getTimeStep () const |
| virtual Scalar | getOrder () const |
| virtual Status | getSolutionStatus () const |
| virtual bool | getOutput () const |
| virtual bool | getIsSynced () const |
Set MetaData values | |
| virtual void | setMetaData (Teuchos::RCP< const SolutionStateMetaData< Scalar > > md) |
| virtual void | setMetaData (Teuchos::RCP< SolutionStateMetaData< Scalar > > md) |
| virtual void | setTime (Scalar time) |
| virtual void | setIndex (Scalar index) |
| virtual void | setTimeStep (Scalar dt) |
| virtual void | setOrder (Scalar order) |
| virtual void | setSolutionStatus (Status s) |
| virtual void | setOutput (bool output) |
| virtual void | setIsSynced (bool isSynced) |
Get State Data | |
| virtual Teuchos::RCP< Thyra::VectorBase< Scalar > > | getX () |
| virtual Teuchos::RCP< const Thyra::VectorBase< Scalar > > | getX () const |
| virtual Teuchos::RCP< Thyra::VectorBase< Scalar > > | getXDot () |
| virtual Teuchos::RCP< const Thyra::VectorBase< Scalar > > | getXDot () const |
| virtual Teuchos::RCP< Thyra::VectorBase< Scalar > > | getXDotDot () |
| virtual Teuchos::RCP< const Thyra::VectorBase< Scalar > > | getXDotDot () const |
| virtual Teuchos::RCP< StepperState< Scalar > > | getStepperState () |
| virtual Teuchos::RCP< const StepperState< Scalar > > | getStepperState () const |
| virtual Teuchos::RCP< PhysicsState< Scalar > > | getPhysicsState () |
| virtual Teuchos::RCP< const PhysicsState< Scalar > > | getPhysicsState () const |
Set State Data | |
| virtual void | setPhysicsState (const Teuchos::RCP< PhysicsState< Scalar > > &ps) |
Comparison methods | |
| bool | operator< (const SolutionState< Scalar > &ss) const |
| Less than comparison for sorting based on time. More... | |
| bool | operator<= (const SolutionState< Scalar > &ss) const |
| Less than comparison for sorting based on time. More... | |
| bool | operator< (const Scalar &t) const |
| Less than comparison for sorting based on time. More... | |
| bool | operator<= (const Scalar &t) const |
| Less than comparison for sorting based on time. More... | |
| bool | operator> (const SolutionState< Scalar > &ss) const |
| Less than comparison for sorting based on time. More... | |
| bool | operator>= (const SolutionState< Scalar > &ss) const |
| Less than comparison for sorting based on time. More... | |
| bool | operator> (const Scalar &t) const |
| Less than comparison for sorting based on time. More... | |
| bool | operator>= (const Scalar &t) const |
| Less than comparison for sorting based on time. More... | |
| bool | operator== (const SolutionState< Scalar > &ss) const |
| Equality comparison for matching. More... | |
| bool | operator== (const Scalar &t) const |
| Equality comparison for matching. More... | |
Overridden from Teuchos::Describable | |
| Teuchos::RCP< const SolutionStateMetaData< Scalar > > | metaData_ |
| Meta Data for the solution state. More... | |
| Teuchos::RCP< SolutionStateMetaData< Scalar > > | metaData_nc_ |
| Teuchos::RCP< const Thyra::VectorBase< Scalar > > | x_ |
| Solution. More... | |
| Teuchos::RCP< Thyra::VectorBase< Scalar > > | x_nc_ |
| Teuchos::RCP< const Thyra::VectorBase< Scalar > > | xdot_ |
| Time derivative of the solution. More... | |
| Teuchos::RCP< Thyra::VectorBase< Scalar > > | xdot_nc_ |
| Teuchos::RCP< const Thyra::VectorBase< Scalar > > | xdotdot_ |
| Second time derivative of the solution. More... | |
| Teuchos::RCP< Thyra::VectorBase< Scalar > > | xdotdot_nc_ |
| Teuchos::RCP< const Tempus::StepperState< Scalar > > | stepperState_ |
| StepperState for this SolutionState. More... | |
| Teuchos::RCP< Tempus::StepperState< Scalar > > | stepperState_nc_ |
| Teuchos::RCP< const Tempus::PhysicsState< Scalar > > | physicsState_ |
| PhysicsState for this SolutionState. More... | |
| Teuchos::RCP< Tempus::PhysicsState< Scalar > > | physicsState_nc_ |
| virtual std::string | description () const |
| virtual void | describe (Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel) const |
Solution state for integrators and steppers. SolutionState contains the metadata for solutions and the solutions themselves.
For simple time integration, the SolutionState is sufficient for checkpointing, restart and undo operations (i.e., it is the Memento object).
For more complex time integration where the physics has additional state information or the time integrator is not a one-step method (i.e., can not accurately start from a single time step), this class can be inherited and the physics state or additional time-integration parameters can be managed.
SolutionStates can be interpolated to generate solutions at various times (see SolutionHistory). However not all metadata or state information can be interpolated. Thus interpolated solutions may not be suitable for checkpointing, restart and undo operations, but may be useful for adjoint sensitivities.
The solution vectors,
,
, and
, in SolutionState can be null pointers. This indicates that the application does not need them, so do not storage them. This can be a huge savings when saving many states in the solution history. Some Steppers will need temporary memory to store time derivative(s) (
, or
) for evaluation of the ODE/DAE (
), but each individual Stepper will manage that.
Definition at line 56 of file Tempus_SolutionState_decl.hpp.
| Tempus::SolutionState< Scalar >::SolutionState | ( | const Teuchos::RCP< Thyra::VectorBase< Scalar > > & | x, |
| const Teuchos::RCP< Thyra::VectorBase< Scalar > > & | xdot = Teuchos::null, |
||
| const Teuchos::RCP< Thyra::VectorBase< Scalar > > & | xddot = Teuchos::null, |
||
| const Teuchos::RCP< StepperState< Scalar > > & | stepperState = Teuchos::null, |
||
| const Teuchos::RCP< PhysicsState< Scalar > > & | physicsState = Teuchos::null |
||
| ) |
Definition at line 18 of file Tempus_SolutionState_impl.hpp.
| Tempus::SolutionState< Scalar >::SolutionState | ( | const Teuchos::RCP< const Thyra::VectorBase< Scalar > > & | x, |
| const Teuchos::RCP< const Thyra::VectorBase< Scalar > > & | xdot = Teuchos::null, |
||
| const Teuchos::RCP< const Thyra::VectorBase< Scalar > > & | xddot = Teuchos::null, |
||
| const Teuchos::RCP< const StepperState< Scalar > > & | stepperSt = Teuchos::null, |
||
| const Teuchos::RCP< const PhysicsState< Scalar > > & | physicsSt = Teuchos::null |
||
| ) |
Definition at line 48 of file Tempus_SolutionState_impl.hpp.
| Tempus::SolutionState< Scalar >::SolutionState | ( | const Teuchos::RCP< SolutionStateMetaData< Scalar > > | ssmd, |
| const Teuchos::RCP< Thyra::VectorBase< Scalar > > & | x, | ||
| const Teuchos::RCP< Thyra::VectorBase< Scalar > > & | xdot, | ||
| const Teuchos::RCP< Thyra::VectorBase< Scalar > > & | xdotdot, | ||
| const Teuchos::RCP< StepperState< Scalar > > & | stepperState, | ||
| const Teuchos::RCP< PhysicsState< Scalar > > & | physicsState = Teuchos::null |
||
| ) |
Definition at line 75 of file Tempus_SolutionState_impl.hpp.
| Tempus::SolutionState< Scalar >::SolutionState | ( | const Teuchos::RCP< const SolutionStateMetaData< Scalar > > | ssmd, |
| const Teuchos::RCP< const Thyra::VectorBase< Scalar > > & | x, | ||
| const Teuchos::RCP< const Thyra::VectorBase< Scalar > > & | xdot, | ||
| const Teuchos::RCP< const Thyra::VectorBase< Scalar > > & | xdotdot, | ||
| const Teuchos::RCP< const StepperState< Scalar > > & | stepperState, | ||
| const Teuchos::RCP< const PhysicsState< Scalar > > & | physicsState = Teuchos::null |
||
| ) |
Definition at line 106 of file Tempus_SolutionState_impl.hpp.
| Tempus::SolutionState< Scalar >::SolutionState | ( | const Scalar | time, |
| const Scalar | dt, | ||
| const int | iStep, | ||
| const Scalar | errorAbs, | ||
| const Scalar | errorRel, | ||
| const int | order, | ||
| const int | nFailures, | ||
| const int | nRunningFailures, | ||
| const int | nConsecutiveFailures, | ||
| const Status | solutionStatus, | ||
| const bool | output, | ||
| const bool | outputScreen, | ||
| const bool | isSynced, | ||
| const bool | isInterpolated, | ||
| const Scalar | accuracy, | ||
| const Teuchos::RCP< Thyra::VectorBase< Scalar > > & | x, | ||
| const Teuchos::RCP< Thyra::VectorBase< Scalar > > & | xdot, | ||
| const Teuchos::RCP< Thyra::VectorBase< Scalar > > & | xdotdot, | ||
| const Teuchos::RCP< StepperState< Scalar > > & | stepperState = Teuchos::null, |
||
| const Teuchos::RCP< PhysicsState< Scalar > > & | physicsState = Teuchos::null |
||
| ) |
Definition at line 138 of file Tempus_SolutionState_impl.hpp.
| Tempus::SolutionState< Scalar >::SolutionState | ( | const Scalar | time, |
| const Scalar | dt, | ||
| const int | iStep, | ||
| const Scalar | errorAbs, | ||
| const Scalar | errorRel, | ||
| const int | order, | ||
| const int | nFailures, | ||
| const int | nRunningFailures, | ||
| const int | nConsecutiveFailures, | ||
| const Status | solutionStatus, | ||
| const bool | output, | ||
| const bool | outputScreen, | ||
| const bool | isSynced, | ||
| const bool | isInterpolated, | ||
| const Scalar | accuracy, | ||
| const Teuchos::RCP< const Thyra::VectorBase< Scalar > > & | x, | ||
| const Teuchos::RCP< const Thyra::VectorBase< Scalar > > & | xdot, | ||
| const Teuchos::RCP< const Thyra::VectorBase< Scalar > > & | xdotdot, | ||
| const Teuchos::RCP< const StepperState< Scalar > > & | stepperSt = Teuchos::null, |
||
| const Teuchos::RCP< const PhysicsState< Scalar > > & | physicsSt = Teuchos::null |
||
| ) |
Definition at line 199 of file Tempus_SolutionState_impl.hpp.
| Tempus::SolutionState< Scalar >::SolutionState | ( | const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > & | model, |
| const Teuchos::RCP< StepperState< Scalar > > & | stepperState = Teuchos::null, |
||
| const Teuchos::RCP< PhysicsState< Scalar > > & | physicsState = Teuchos::null |
||
| ) |
Definition at line 260 of file Tempus_SolutionState_impl.hpp.
| Tempus::SolutionState< Scalar >::SolutionState | ( | const SolutionState< Scalar > & | ss | ) |
This is a shallow copy constructor, use clone for a deep copy constructor.
Definition at line 318 of file Tempus_SolutionState_impl.hpp.
|
inlinevirtual |
Destructor.
Definition at line 159 of file Tempus_SolutionState_decl.hpp.
|
virtual |
This is a deep copy constructor.
Definition at line 335 of file Tempus_SolutionState_impl.hpp.
|
virtual |
This is a deep copy.
Definition at line 366 of file Tempus_SolutionState_impl.hpp.
|
virtual |
Deep copy solution data, but keep metaData untouched.
Definition at line 375 of file Tempus_SolutionState_impl.hpp.
|
virtual |
Definition at line 502 of file Tempus_SolutionState_impl.hpp.
|
virtual |
Definition at line 495 of file Tempus_SolutionState_impl.hpp.
|
inlinevirtual |
Definition at line 170 of file Tempus_SolutionState_decl.hpp.
|
inlinevirtual |
Definition at line 176 of file Tempus_SolutionState_decl.hpp.
|
inlinevirtual |
Definition at line 165 of file Tempus_SolutionState_decl.hpp.
|
inlinevirtual |
Definition at line 164 of file Tempus_SolutionState_decl.hpp.
|
inlinevirtual |
Definition at line 172 of file Tempus_SolutionState_decl.hpp.
|
inlinevirtual |
Definition at line 175 of file Tempus_SolutionState_decl.hpp.
|
inlinevirtual |
Definition at line 225 of file Tempus_SolutionState_decl.hpp.
|
inlinevirtual |
Definition at line 227 of file Tempus_SolutionState_decl.hpp.
|
inlinevirtual |
Definition at line 173 of file Tempus_SolutionState_decl.hpp.
|
inlinevirtual |
Definition at line 219 of file Tempus_SolutionState_decl.hpp.
|
inlinevirtual |
Definition at line 222 of file Tempus_SolutionState_decl.hpp.
|
inlinevirtual |
Definition at line 169 of file Tempus_SolutionState_decl.hpp.
|
inlinevirtual |
Definition at line 171 of file Tempus_SolutionState_decl.hpp.
|
inlinevirtual |
Definition at line 205 of file Tempus_SolutionState_decl.hpp.
|
inlinevirtual |
Definition at line 208 of file Tempus_SolutionState_decl.hpp.
|
inlinevirtual |
Definition at line 210 of file Tempus_SolutionState_decl.hpp.
|
inlinevirtual |
Definition at line 212 of file Tempus_SolutionState_decl.hpp.
|
inlinevirtual |
Definition at line 214 of file Tempus_SolutionState_decl.hpp.
|
inlinevirtual |
Definition at line 216 of file Tempus_SolutionState_decl.hpp.
| bool Tempus::SolutionState< Scalar >::operator< | ( | const Scalar & | t | ) | const |
Less than comparison for sorting based on time.
Definition at line 447 of file Tempus_SolutionState_impl.hpp.
| bool Tempus::SolutionState< Scalar >::operator< | ( | const SolutionState< Scalar > & | ss | ) | const |
Less than comparison for sorting based on time.
Definition at line 435 of file Tempus_SolutionState_impl.hpp.
| bool Tempus::SolutionState< Scalar >::operator<= | ( | const Scalar & | t | ) | const |
Less than comparison for sorting based on time.
Definition at line 453 of file Tempus_SolutionState_impl.hpp.
| bool Tempus::SolutionState< Scalar >::operator<= | ( | const SolutionState< Scalar > & | ss | ) | const |
Less than comparison for sorting based on time.
Definition at line 441 of file Tempus_SolutionState_impl.hpp.
| bool Tempus::SolutionState< Scalar >::operator== | ( | const Scalar & | t | ) | const |
Equality comparison for matching.
Definition at line 489 of file Tempus_SolutionState_impl.hpp.
| bool Tempus::SolutionState< Scalar >::operator== | ( | const SolutionState< Scalar > & | ss | ) | const |
Equality comparison for matching.
Definition at line 483 of file Tempus_SolutionState_impl.hpp.
| bool Tempus::SolutionState< Scalar >::operator> | ( | const Scalar & | t | ) | const |
Less than comparison for sorting based on time.
Definition at line 471 of file Tempus_SolutionState_impl.hpp.
| bool Tempus::SolutionState< Scalar >::operator> | ( | const SolutionState< Scalar > & | ss | ) | const |
Less than comparison for sorting based on time.
Definition at line 459 of file Tempus_SolutionState_impl.hpp.
| bool Tempus::SolutionState< Scalar >::operator>= | ( | const Scalar & | t | ) | const |
Less than comparison for sorting based on time.
Definition at line 477 of file Tempus_SolutionState_impl.hpp.
| bool Tempus::SolutionState< Scalar >::operator>= | ( | const SolutionState< Scalar > & | ss | ) | const |
Less than comparison for sorting based on time.
Definition at line 465 of file Tempus_SolutionState_impl.hpp.
|
inlinevirtual |
Definition at line 188 of file Tempus_SolutionState_decl.hpp.
|
inlinevirtual |
Definition at line 198 of file Tempus_SolutionState_decl.hpp.
|
inlinevirtual |
Definition at line 181 of file Tempus_SolutionState_decl.hpp.
|
inlinevirtual |
Definition at line 184 of file Tempus_SolutionState_decl.hpp.
|
inlinevirtual |
Definition at line 190 of file Tempus_SolutionState_decl.hpp.
|
inlinevirtual |
Definition at line 195 of file Tempus_SolutionState_decl.hpp.
|
inlinevirtual |
Definition at line 233 of file Tempus_SolutionState_decl.hpp.
|
inlinevirtual |
Definition at line 193 of file Tempus_SolutionState_decl.hpp.
|
inlinevirtual |
Definition at line 187 of file Tempus_SolutionState_decl.hpp.
|
inlinevirtual |
Definition at line 189 of file Tempus_SolutionState_decl.hpp.
|
virtual |
Swap solution data, but keep metaData untouched.
Definition at line 388 of file Tempus_SolutionState_impl.hpp.
|
private |
Meta Data for the solution state.
Definition at line 282 of file Tempus_SolutionState_decl.hpp.
|
private |
Definition at line 283 of file Tempus_SolutionState_decl.hpp.
|
private |
PhysicsState for this SolutionState.
Definition at line 302 of file Tempus_SolutionState_decl.hpp.
|
private |
Definition at line 303 of file Tempus_SolutionState_decl.hpp.
|
private |
StepperState for this SolutionState.
Definition at line 298 of file Tempus_SolutionState_decl.hpp.
|
private |
Definition at line 299 of file Tempus_SolutionState_decl.hpp.
|
private |
Solution.
Definition at line 286 of file Tempus_SolutionState_decl.hpp.
|
private |
Definition at line 287 of file Tempus_SolutionState_decl.hpp.
|
private |
Time derivative of the solution.
Definition at line 290 of file Tempus_SolutionState_decl.hpp.
|
private |
Definition at line 291 of file Tempus_SolutionState_decl.hpp.
|
private |
Second time derivative of the solution.
Definition at line 294 of file Tempus_SolutionState_decl.hpp.
|
private |
Definition at line 295 of file Tempus_SolutionState_decl.hpp.