Tempus Version of the Day
Time Integration
|
Solution state for integrators and steppers. 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. | |
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) | |
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) | |
SolutionState (const SolutionState< Scalar > &ss) | |
This is a shallow copy constructor, use clone for a deep copy constructor. | |
virtual Teuchos::RCP< SolutionState< Scalar > > | clone () const |
This is a deep copy constructor. | |
virtual void | copy (const Teuchos::RCP< const SolutionState< Scalar > > &ss) |
This is a deep copy. | |
virtual void | copySolutionData (const Teuchos::RCP< const SolutionState< Scalar > > &s) |
Deep copy solution data, but keep metaData untouched. | |
virtual | ~SolutionState () |
Destructor. | |
Overridden from Teuchos::Describable | |
Teuchos::RCP< const SolutionStateMetaData< Scalar > > | metaData_ |
Meta Data for the solution state. | |
Teuchos::RCP< SolutionStateMetaData< Scalar > > | metaData_nc_ |
Teuchos::RCP< const Thyra::VectorBase< Scalar > > | x_ |
Solution. | |
Teuchos::RCP< Thyra::VectorBase< Scalar > > | x_nc_ |
Teuchos::RCP< const Thyra::VectorBase< Scalar > > | xdot_ |
Time derivative of the solution. | |
Teuchos::RCP< Thyra::VectorBase< Scalar > > | xdot_nc_ |
Teuchos::RCP< const Thyra::VectorBase< Scalar > > | xdotdot_ |
Second time derivative of the solution. | |
Teuchos::RCP< Thyra::VectorBase< Scalar > > | xdotdot_nc_ |
Teuchos::RCP< const StepperState< Scalar > > | stepperState_ |
StepperState for this SolutionState. | |
Teuchos::RCP< StepperState< Scalar > > | stepperState_nc_ |
Teuchos::RCP< const PhysicsState< Scalar > > | physicsState_ |
PhysicsState for this SolutionState. | |
Teuchos::RCP< PhysicsState< Scalar > > | physicsState_nc_ |
virtual std::string | description () const |
virtual void | describe (Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel) const |
virtual void | computeNorms (const Teuchos::RCP< const SolutionState< Scalar > > &ssIn=Teuchos::null) |
Compute the solution norms, and solution change from ssIn, if provided. | |
Get MetaData values | |
virtual Teuchos::RCP< const SolutionStateMetaData< Scalar > > | getMetaData () const |
virtual Teuchos::RCP< SolutionStateMetaData< Scalar > > | getMetaData () |
virtual Scalar | getTime () const |
virtual int | getIndex () const |
virtual Scalar | getTimeStep () const |
virtual Scalar | getErrorAbs () const |
virtual Scalar | getErrorRel () const |
virtual Scalar | getErrorRelNm1 () const |
virtual Scalar | getErrorRelNm2 () const |
virtual int | getOrder () const |
virtual int | getNFailures () const |
virtual int | getNRunningFailures () const |
virtual int | getNConsecutiveFailures () const |
virtual Scalar | getTolAbs () const |
virtual Scalar | getTolRel () const |
virtual Scalar | getXNormL2 () const |
virtual Scalar | getDxNormL2Abs () const |
virtual Scalar | getDxNormL2Rel () const |
virtual bool | getComputeNorms () const |
virtual Status | getSolutionStatus () const |
virtual bool | getOutput () const |
virtual bool | getOutputScreen () const |
virtual bool | getIsSynced () const |
virtual bool | getIsInterpolated () const |
virtual bool | getAccuracy () 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 | setErrorAbs (Scalar errorAbs) |
virtual void | setErrorRel (Scalar errorRel) |
virtual void | setOrder (int order) |
virtual void | setNFailures (int nFailures) |
virtual void | setNRunningFailures (int nFailures) |
virtual void | setNConsecutiveFailures (int nConsecutiveFailures) |
virtual void | setTolRel (Scalar tolRel) |
virtual void | setTolAbs (Scalar tolAbs) |
virtual void | setXNormL2 (Scalar xNormL2) |
virtual void | setDxNormL2Rel (Scalar dxNormL2Rel) |
virtual void | setDxNormL2Abs (Scalar dxNormL2Abs) |
virtual void | setComputeNorms (bool computeNorms) |
virtual void | setSolutionStatus (Status s) |
virtual void | setSolutionStatus (const Thyra::SolveStatus< Scalar > sStatus) |
virtual void | setOutput (bool output) |
virtual void | setOutputScreen (bool output) |
virtual void | setIsSynced (bool isSynced) |
virtual void | setIsInterpolated (bool isInterpolated) |
virtual void | setAccuracy (bool accuracy) |
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 | setStepperState (Teuchos::RCP< StepperState< Scalar > > &ss) |
virtual void | setStepperState (const Teuchos::RCP< StepperState< Scalar > > &ss) |
virtual void | setPhysicsState (Teuchos::RCP< PhysicsState< Scalar > > &ps) |
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. | |
bool | operator<= (const SolutionState< Scalar > &ss) const |
Less than or equal to comparison for sorting based on time. | |
bool | operator< (const Scalar &t) const |
Less than comparison for sorting based on time. | |
bool | operator<= (const Scalar &t) const |
Less than or equal to comparison for sorting based on time. | |
bool | operator> (const SolutionState< Scalar > &ss) const |
Greater than comparison for sorting based on time. | |
bool | operator>= (const SolutionState< Scalar > &ss) const |
Greater than or equal to comparison for sorting based on time. | |
bool | operator> (const Scalar &t) const |
Greater than comparison for sorting based on time. | |
bool | operator>= (const Scalar &t) const |
Greater than or equal to comparison for sorting based on time. | |
bool | operator== (const SolutionState< Scalar > &ss) const |
Equality comparison for matching. | |
bool | operator== (const Scalar &t) const |
Equality comparison for matching. | |
Solution state for integrators and steppers.
The SolutionState object contains all the information and functions related to solution variables at a particular state or time,
The solution variables,
There are two important concepts for the SolutionState related to the solution,
Consistency is a very important attribute of a solution to be able to use it for initial conditions and restart. At the cost of a solve, a SolutionState can be made consistent for the Stepper being used by resetting the time derivatives,
The second concept for the SolutionState is the idea of the solution,
For more complex time integration where the physics has additional state information or the time integrator is not a one-step method (i.e., cannot accurately start from a single time step), this class can be inherited and the physics state (PhysicsState) 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 diagnostics, output and/or adjoint sensitivities.
The solution vectors,
Definition at line 137 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< 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 | ||
) |
Definition at line 39 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 | ||
) |
Definition at line 70 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 99 of file Tempus_SolutionState_impl.hpp.
|
inlinevirtual |
Destructor.
Definition at line 176 of file Tempus_SolutionState_decl.hpp.
|
virtual |
This is a deep copy constructor.
Definition at line 116 of file Tempus_SolutionState_impl.hpp.
|
virtual |
This is a deep copy.
Definition at line 145 of file Tempus_SolutionState_impl.hpp.
|
virtual |
Deep copy solution data, but keep metaData untouched.
Definition at line 153 of file Tempus_SolutionState_impl.hpp.
|
inlinevirtual |
Definition at line 180 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 191 of file Tempus_SolutionState_decl.hpp.
|
inlinevirtual |
Definition at line 192 of file Tempus_SolutionState_decl.hpp.
|
inlinevirtual |
Definition at line 193 of file Tempus_SolutionState_decl.hpp.
|
inlinevirtual |
Definition at line 194 of file Tempus_SolutionState_decl.hpp.
|
inlinevirtual |
Definition at line 195 of file Tempus_SolutionState_decl.hpp.
|
inlinevirtual |
Definition at line 196 of file Tempus_SolutionState_decl.hpp.
|
inlinevirtual |
Definition at line 197 of file Tempus_SolutionState_decl.hpp.
|
inlinevirtual |
Definition at line 198 of file Tempus_SolutionState_decl.hpp.
|
inlinevirtual |
Definition at line 199 of file Tempus_SolutionState_decl.hpp.
|
inlinevirtual |
Definition at line 203 of file Tempus_SolutionState_decl.hpp.
|
inlinevirtual |
Definition at line 207 of file Tempus_SolutionState_decl.hpp.
|
inlinevirtual |
Definition at line 208 of file Tempus_SolutionState_decl.hpp.
|
inlinevirtual |
Definition at line 209 of file Tempus_SolutionState_decl.hpp.
|
inlinevirtual |
Definition at line 210 of file Tempus_SolutionState_decl.hpp.
|
inlinevirtual |
Definition at line 211 of file Tempus_SolutionState_decl.hpp.
|
inlinevirtual |
Definition at line 212 of file Tempus_SolutionState_decl.hpp.
|
inlinevirtual |
Definition at line 213 of file Tempus_SolutionState_decl.hpp.
|
inlinevirtual |
Definition at line 217 of file Tempus_SolutionState_decl.hpp.
|
inlinevirtual |
Definition at line 218 of file Tempus_SolutionState_decl.hpp.
|
inlinevirtual |
Definition at line 219 of file Tempus_SolutionState_decl.hpp.
|
inlinevirtual |
Definition at line 220 of file Tempus_SolutionState_decl.hpp.
|
inlinevirtual |
Definition at line 224 of file Tempus_SolutionState_decl.hpp.
|
inlinevirtual |
Definition at line 229 of file Tempus_SolutionState_decl.hpp.
|
inlinevirtual |
Definition at line 235 of file Tempus_SolutionState_decl.hpp.
|
inlinevirtual |
Definition at line 241 of file Tempus_SolutionState_decl.hpp.
|
inlinevirtual |
Definition at line 246 of file Tempus_SolutionState_decl.hpp.
|
inlinevirtual |
Definition at line 251 of file Tempus_SolutionState_decl.hpp.
|
inlinevirtual |
Definition at line 256 of file Tempus_SolutionState_decl.hpp.
|
inlinevirtual |
Definition at line 261 of file Tempus_SolutionState_decl.hpp.
|
inlinevirtual |
Definition at line 266 of file Tempus_SolutionState_decl.hpp.
|
inlinevirtual |
Definition at line 272 of file Tempus_SolutionState_decl.hpp.
|
inlinevirtual |
Definition at line 277 of file Tempus_SolutionState_decl.hpp.
|
inlinevirtual |
Definition at line 282 of file Tempus_SolutionState_decl.hpp.
|
inlinevirtual |
Definition at line 287 of file Tempus_SolutionState_decl.hpp.
|
inlinevirtual |
Definition at line 292 of file Tempus_SolutionState_decl.hpp.
|
inlinevirtual |
Definition at line 298 of file Tempus_SolutionState_decl.hpp.
|
inlinevirtual |
Definition at line 303 of file Tempus_SolutionState_decl.hpp.
|
inlinevirtual |
Definition at line 308 of file Tempus_SolutionState_decl.hpp.
|
inlinevirtual |
Definition at line 313 of file Tempus_SolutionState_decl.hpp.
|
inlinevirtual |
Definition at line 319 of file Tempus_SolutionState_decl.hpp.
|
inlinevirtual |
Definition at line 324 of file Tempus_SolutionState_decl.hpp.
|
inlinevirtual |
Definition at line 332 of file Tempus_SolutionState_decl.hpp.
|
inlinevirtual |
Definition at line 337 of file Tempus_SolutionState_decl.hpp.
|
inlinevirtual |
Definition at line 342 of file Tempus_SolutionState_decl.hpp.
|
inlinevirtual |
Definition at line 347 of file Tempus_SolutionState_decl.hpp.
|
inlinevirtual |
Definition at line 352 of file Tempus_SolutionState_decl.hpp.
|
inlinevirtual |
Definition at line 361 of file Tempus_SolutionState_decl.hpp.
|
inlinevirtual |
Definition at line 366 of file Tempus_SolutionState_decl.hpp.
|
inlinevirtual |
Definition at line 370 of file Tempus_SolutionState_decl.hpp.
|
inlinevirtual |
Definition at line 374 of file Tempus_SolutionState_decl.hpp.
|
inlinevirtual |
Definition at line 378 of file Tempus_SolutionState_decl.hpp.
|
inlinevirtual |
Definition at line 382 of file Tempus_SolutionState_decl.hpp.
|
inlinevirtual |
Definition at line 387 of file Tempus_SolutionState_decl.hpp.
|
inlinevirtual |
Definition at line 392 of file Tempus_SolutionState_decl.hpp.
|
inlinevirtual |
Definition at line 397 of file Tempus_SolutionState_decl.hpp.
|
inlinevirtual |
Definition at line 401 of file Tempus_SolutionState_decl.hpp.
|
inlinevirtual |
Definition at line 409 of file Tempus_SolutionState_decl.hpp.
|
inlinevirtual |
Definition at line 414 of file Tempus_SolutionState_decl.hpp.
|
inlinevirtual |
Definition at line 419 of file Tempus_SolutionState_decl.hpp.
|
inlinevirtual |
Definition at line 424 of file Tempus_SolutionState_decl.hpp.
|
inlinevirtual |
Definition at line 429 of file Tempus_SolutionState_decl.hpp.
|
inlinevirtual |
Definition at line 434 of file Tempus_SolutionState_decl.hpp.
|
inlinevirtual |
Definition at line 441 of file Tempus_SolutionState_decl.hpp.
|
inlinevirtual |
Definition at line 446 of file Tempus_SolutionState_decl.hpp.
|
inlinevirtual |
Definition at line 452 of file Tempus_SolutionState_decl.hpp.
|
inlinevirtual |
Definition at line 457 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 209 of file Tempus_SolutionState_impl.hpp.
bool Tempus::SolutionState< Scalar >::operator<= | ( | const SolutionState< Scalar > & | ss | ) | const |
Less than or equal to comparison for sorting based on time.
Definition at line 215 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 221 of file Tempus_SolutionState_impl.hpp.
bool Tempus::SolutionState< Scalar >::operator<= | ( | const Scalar & | t | ) | const |
Less than or equal to comparison for sorting based on time.
Definition at line 227 of file Tempus_SolutionState_impl.hpp.
bool Tempus::SolutionState< Scalar >::operator> | ( | const SolutionState< Scalar > & | ss | ) | const |
Greater than comparison for sorting based on time.
Definition at line 233 of file Tempus_SolutionState_impl.hpp.
bool Tempus::SolutionState< Scalar >::operator>= | ( | const SolutionState< Scalar > & | ss | ) | const |
Greater than or equal to comparison for sorting based on time.
Definition at line 239 of file Tempus_SolutionState_impl.hpp.
bool Tempus::SolutionState< Scalar >::operator> | ( | const Scalar & | t | ) | const |
Greater than comparison for sorting based on time.
Definition at line 245 of file Tempus_SolutionState_impl.hpp.
bool Tempus::SolutionState< Scalar >::operator>= | ( | const Scalar & | t | ) | const |
Greater than or equal to comparison for sorting based on time.
Definition at line 251 of file Tempus_SolutionState_impl.hpp.
bool Tempus::SolutionState< Scalar >::operator== | ( | const SolutionState< Scalar > & | ss | ) | const |
Equality comparison for matching.
Definition at line 257 of file Tempus_SolutionState_impl.hpp.
bool Tempus::SolutionState< Scalar >::operator== | ( | const Scalar & | t | ) | const |
Equality comparison for matching.
Definition at line 263 of file Tempus_SolutionState_impl.hpp.
|
virtual |
Definition at line 269 of file Tempus_SolutionState_impl.hpp.
|
virtual |
Definition at line 281 of file Tempus_SolutionState_impl.hpp.
|
virtual |
Compute the solution norms, and solution change from ssIn, if provided.
Definition at line 314 of file Tempus_SolutionState_impl.hpp.
|
private |
Meta Data for the solution state.
Definition at line 512 of file Tempus_SolutionState_decl.hpp.
|
private |
Definition at line 513 of file Tempus_SolutionState_decl.hpp.
|
private |
Solution.
Definition at line 516 of file Tempus_SolutionState_decl.hpp.
|
private |
Definition at line 517 of file Tempus_SolutionState_decl.hpp.
|
private |
Time derivative of the solution.
Definition at line 520 of file Tempus_SolutionState_decl.hpp.
|
private |
Definition at line 521 of file Tempus_SolutionState_decl.hpp.
|
private |
Second time derivative of the solution.
Definition at line 524 of file Tempus_SolutionState_decl.hpp.
|
private |
Definition at line 525 of file Tempus_SolutionState_decl.hpp.
|
private |
StepperState for this SolutionState.
Definition at line 528 of file Tempus_SolutionState_decl.hpp.
|
private |
Definition at line 529 of file Tempus_SolutionState_decl.hpp.
|
private |
PhysicsState for this SolutionState.
Definition at line 532 of file Tempus_SolutionState_decl.hpp.
|
private |
Definition at line 533 of file Tempus_SolutionState_decl.hpp.