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 () | |
Default Constructor – Not meant for immediate adding to SolutionHistory. This constructor does not set the solution vectors, x, xdot and xdotdot. which should be set via setX(), setXDot(), and/or setXDotDot() prior to being added to SolutionHistory. More... | |
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 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 | ~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 Scalar | getNRunningFailures () const |
virtual Scalar | getNConsecutiveFailures () 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 | setSolutionStatus (const Thyra::SolveStatus< Scalar > sStatus) |
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 | setX (Teuchos::RCP< Thyra::VectorBase< Scalar > > x) |
virtual void | setX (Teuchos::RCP< const Thyra::VectorBase< Scalar > > x) |
virtual void | setXDot (Teuchos::RCP< Thyra::VectorBase< Scalar > > xdot) |
virtual void | setXDot (Teuchos::RCP< const Thyra::VectorBase< Scalar > > xdot) |
virtual void | setXDotDot (Teuchos::RCP< Thyra::VectorBase< Scalar > > xdotdot) |
virtual void | setXDotDot (Teuchos::RCP< const Thyra::VectorBase< Scalar > > xdotdot) |
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 | |
virtual std::string | description () const |
virtual void | describe (Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel) const |
Private Attributes | |
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_ |
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 | ( | ) |
Default Constructor – Not meant for immediate adding to SolutionHistory. This constructor does not set the solution vectors, x, xdot and xdotdot. which should be set via setX(), setXDot(), and/or setXDotDot() prior to being added to SolutionHistory.
Definition at line 18 of file Tempus_SolutionState_impl.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 40 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 70 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 107 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 138 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 170 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 228 of file Tempus_SolutionState_impl.hpp.
|
inlinevirtual |
Destructor.
Definition at line 118 of file Tempus_SolutionState_decl.hpp.
|
virtual |
This is a deep copy constructor.
Definition at line 245 of file Tempus_SolutionState_impl.hpp.
|
virtual |
This is a deep copy.
Definition at line 276 of file Tempus_SolutionState_impl.hpp.
|
virtual |
Deep copy solution data, but keep metaData untouched.
Definition at line 285 of file Tempus_SolutionState_impl.hpp.
|
virtual |
Definition at line 390 of file Tempus_SolutionState_impl.hpp.
|
virtual |
Definition at line 383 of file Tempus_SolutionState_impl.hpp.
|
inlinevirtual |
Definition at line 129 of file Tempus_SolutionState_decl.hpp.
|
inlinevirtual |
Definition at line 139 of file Tempus_SolutionState_decl.hpp.
|
inlinevirtual |
Definition at line 123 of file Tempus_SolutionState_decl.hpp.
|
inlinevirtual |
Definition at line 124 of file Tempus_SolutionState_decl.hpp.
|
inlinevirtual |
Definition at line 134 of file Tempus_SolutionState_decl.hpp.
|
inlinevirtual |
Definition at line 132 of file Tempus_SolutionState_decl.hpp.
|
inlinevirtual |
Definition at line 131 of file Tempus_SolutionState_decl.hpp.
|
inlinevirtual |
Definition at line 138 of file Tempus_SolutionState_decl.hpp.
|
inlinevirtual |
Definition at line 197 of file Tempus_SolutionState_decl.hpp.
|
inlinevirtual |
Definition at line 199 of file Tempus_SolutionState_decl.hpp.
|
inlinevirtual |
Definition at line 136 of file Tempus_SolutionState_decl.hpp.
|
inlinevirtual |
Definition at line 191 of file Tempus_SolutionState_decl.hpp.
|
inlinevirtual |
Definition at line 194 of file Tempus_SolutionState_decl.hpp.
|
inlinevirtual |
Definition at line 128 of file Tempus_SolutionState_decl.hpp.
|
inlinevirtual |
Definition at line 130 of file Tempus_SolutionState_decl.hpp.
|
inlinevirtual |
Definition at line 177 of file Tempus_SolutionState_decl.hpp.
|
inlinevirtual |
Definition at line 180 of file Tempus_SolutionState_decl.hpp.
|
inlinevirtual |
Definition at line 182 of file Tempus_SolutionState_decl.hpp.
|
inlinevirtual |
Definition at line 184 of file Tempus_SolutionState_decl.hpp.
|
inlinevirtual |
Definition at line 186 of file Tempus_SolutionState_decl.hpp.
|
inlinevirtual |
Definition at line 188 of file Tempus_SolutionState_decl.hpp.
bool Tempus::SolutionState< Scalar >::operator< | ( | const SolutionState< Scalar > & | ss | ) | const |
Less than comparison for sorting based on time.
Definition at line 323 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 335 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 329 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 341 of file Tempus_SolutionState_impl.hpp.
bool Tempus::SolutionState< Scalar >::operator== | ( | const SolutionState< Scalar > & | ss | ) | const |
Equality comparison for matching.
Definition at line 371 of file Tempus_SolutionState_impl.hpp.
bool Tempus::SolutionState< Scalar >::operator== | ( | const Scalar & | t | ) | const |
Equality comparison for matching.
Definition at line 377 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 347 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 359 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 353 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 365 of file Tempus_SolutionState_impl.hpp.
|
inlinevirtual |
Definition at line 151 of file Tempus_SolutionState_decl.hpp.
|
inlinevirtual |
Definition at line 170 of file Tempus_SolutionState_decl.hpp.
|
inlinevirtual |
Definition at line 144 of file Tempus_SolutionState_decl.hpp.
|
inlinevirtual |
Definition at line 147 of file Tempus_SolutionState_decl.hpp.
|
inlinevirtual |
Definition at line 153 of file Tempus_SolutionState_decl.hpp.
|
inlinevirtual |
Definition at line 167 of file Tempus_SolutionState_decl.hpp.
|
inlinevirtual |
Definition at line 218 of file Tempus_SolutionState_decl.hpp.
|
inlinevirtual |
Definition at line 156 of file Tempus_SolutionState_decl.hpp.
|
inlinevirtual |
Definition at line 159 of file Tempus_SolutionState_decl.hpp.
|
inlinevirtual |
Definition at line 150 of file Tempus_SolutionState_decl.hpp.
|
inlinevirtual |
Definition at line 152 of file Tempus_SolutionState_decl.hpp.
|
inlinevirtual |
Definition at line 205 of file Tempus_SolutionState_decl.hpp.
|
inlinevirtual |
Definition at line 207 of file Tempus_SolutionState_decl.hpp.
|
inlinevirtual |
Definition at line 209 of file Tempus_SolutionState_decl.hpp.
|
inlinevirtual |
Definition at line 211 of file Tempus_SolutionState_decl.hpp.
|
inlinevirtual |
Definition at line 213 of file Tempus_SolutionState_decl.hpp.
|
inlinevirtual |
Definition at line 215 of file Tempus_SolutionState_decl.hpp.
|
private |
Meta Data for the solution state.
Definition at line 267 of file Tempus_SolutionState_decl.hpp.
|
private |
Definition at line 268 of file Tempus_SolutionState_decl.hpp.
|
private |
PhysicsState for this SolutionState.
Definition at line 287 of file Tempus_SolutionState_decl.hpp.
|
private |
Definition at line 288 of file Tempus_SolutionState_decl.hpp.
|
private |
StepperState for this SolutionState.
Definition at line 283 of file Tempus_SolutionState_decl.hpp.
|
private |
Definition at line 284 of file Tempus_SolutionState_decl.hpp.
|
private |
Solution.
Definition at line 271 of file Tempus_SolutionState_decl.hpp.
|
private |
Definition at line 272 of file Tempus_SolutionState_decl.hpp.
|
private |
Time derivative of the solution.
Definition at line 275 of file Tempus_SolutionState_decl.hpp.
|
private |
Definition at line 276 of file Tempus_SolutionState_decl.hpp.
|
private |
Second time derivative of the solution.
Definition at line 279 of file Tempus_SolutionState_decl.hpp.
|
private |
Definition at line 280 of file Tempus_SolutionState_decl.hpp.