10 #ifndef Tempus_SolutionState_decl_hpp
11 #define Tempus_SolutionState_decl_hpp
13 #include "Teuchos_VerboseObject.hpp"
14 #include "Teuchos_Describable.hpp"
16 #include "Thyra_VectorBase.hpp"
17 #include "Thyra_ModelEvaluator.hpp"
19 #include "Tempus_config.hpp"
20 #include "Tempus_SolutionStateMetaData.hpp"
22 #include "Tempus_PhysicsState.hpp"
136 template <
class Scalar>
205 return metaData_->getNConsecutiveFailures();
285 metaData_nc_->setNConsecutiveFailures(nConsecutiveFailures);
416 x_nc_ = Teuchos::null;
466 bool operator<(const SolutionState<Scalar>& ss)
const;
470 bool operator<=(const SolutionState<Scalar>& ss)
const;
537 template <
class Scalar>
544 template <
class Scalar>
552 template <
class Scalar>
560 #endif // Tempus_SolutionState_decl_hpp
Teuchos::RCP< SolutionState< Scalar > > createSolutionStateX(const Teuchos::RCP< Thyra::VectorBase< Scalar > > &x, const Teuchos::RCP< Thyra::VectorBase< Scalar > > &xdot=Teuchos::null, const Teuchos::RCP< Thyra::VectorBase< Scalar > > &xdotdot=Teuchos::null)
Nonmember constructor from non-const solution vectors, x.
PhysicsState is a simple class to hold information about the physics.
virtual Scalar getErrorRelNm2() const
virtual Teuchos::RCP< const Thyra::VectorBase< Scalar > > getXDot() const
virtual void setXNormL2(Scalar xNormL2)
virtual Teuchos::RCP< StepperState< Scalar > > getStepperState()
virtual int getNRunningFailures() const
virtual void setNFailures(int nFailures)
virtual void setStepperState(const Teuchos::RCP< StepperState< Scalar > > &ss)
virtual int getOrder() const
Teuchos::RCP< Thyra::VectorBase< Scalar > > xdot_nc_
virtual bool getOutputScreen() const
virtual Teuchos::RCP< Thyra::VectorBase< Scalar > > getXDot()
virtual void setDxNormL2Rel(Scalar dxNormL2Rel)
virtual void setXDot(Teuchos::RCP< const Thyra::VectorBase< Scalar > > xdot)
virtual void setErrorAbs(Scalar errorAbs)
virtual Scalar getTolRel() const
Teuchos::RCP< const SolutionStateMetaData< Scalar > > metaData_
Meta Data for the solution state.
virtual Scalar getErrorRelNm1() const
virtual void setTolAbs(Scalar tolAbs)
virtual void setStepperState(Teuchos::RCP< StepperState< Scalar > > &ss)
virtual Scalar getTolAbs() const
virtual int getNConsecutiveFailures() const
virtual void setIsSynced(bool isSynced)
virtual void setIsInterpolated(bool isInterpolated)
virtual void setXDot(Teuchos::RCP< Thyra::VectorBase< Scalar > > xdot)
virtual int getIndex() const
Teuchos::RCP< PhysicsState< Scalar > > physicsState_nc_
virtual Teuchos::RCP< const Thyra::VectorBase< Scalar > > getX() const
virtual int getNFailures() const
Teuchos::RCP< const PhysicsState< Scalar > > physicsState_
PhysicsState for this SolutionState.
virtual Scalar getXNormL2() const
virtual void setDxNormL2Abs(Scalar dxNormL2Abs)
Teuchos::RCP< const Thyra::VectorBase< Scalar > > xdotdot_
Second time derivative of the solution.
virtual bool getOutput() const
virtual Teuchos::RCP< PhysicsState< Scalar > > getPhysicsState()
Teuchos::RCP< Thyra::VectorBase< Scalar > > xdotdot_nc_
StepperState is a simple class to hold state information about the stepper.
virtual void setIndex(Scalar index)
virtual Scalar getTime() const
bool operator>(const SolutionState< Scalar > &ss) const
Greater than comparison for sorting based on time.
Status
Status for the Integrator, the Stepper and the SolutionState.
Teuchos::RCP< const StepperState< Scalar > > stepperState_
StepperState for this SolutionState.
virtual void setSolutionStatus(const Thyra::SolveStatus< Scalar > sStatus)
virtual void setTimeStep(Scalar dt)
virtual void setErrorRel(Scalar errorRel)
virtual void setNRunningFailures(int nFailures)
virtual void copySolutionData(const Teuchos::RCP< const SolutionState< Scalar > > &s)
Deep copy solution data, but keep metaData untouched.
virtual void describe(Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel) const
virtual Teuchos::RCP< Thyra::VectorBase< Scalar > > getXDotDot()
virtual void setSolutionStatus(Status s)
virtual Teuchos::RCP< const PhysicsState< Scalar > > getPhysicsState() const
SolutionState()
Default Constructor – Not meant for immediate adding to SolutionHistory. This constructor does not se...
virtual void setX(Teuchos::RCP< const Thyra::VectorBase< Scalar > > x)
virtual Teuchos::RCP< const StepperState< Scalar > > getStepperState() const
virtual void setNConsecutiveFailures(int nConsecutiveFailures)
virtual bool getIsSynced() const
virtual Scalar getDxNormL2Rel() const
bool operator>=(const SolutionState< Scalar > &ss) const
Greater than or equal to comparison for sorting based on time.
virtual bool getComputeNorms() const
Teuchos::RCP< SolutionState< Scalar > > createSolutionStateME(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &model, const Teuchos::RCP< StepperState< Scalar > > &stepperState=Teuchos::null, const Teuchos::RCP< PhysicsState< Scalar > > &physicsState=Teuchos::null)
Nonmember constructor from Thyra ModelEvaluator.
virtual void setXDotDot(Teuchos::RCP< Thyra::VectorBase< Scalar > > xdotdot)
Teuchos::RCP< const Thyra::VectorBase< Scalar > > x_
Solution.
Teuchos::RCP< Thyra::VectorBase< Scalar > > x_nc_
bool operator==(const SolutionState< Scalar > &ss) const
Equality comparison for matching.
Teuchos::RCP< StepperState< Scalar > > stepperState_nc_
virtual Teuchos::RCP< SolutionStateMetaData< Scalar > > getMetaData()
virtual Scalar getErrorAbs() const
virtual void setAccuracy(bool accuracy)
virtual ~SolutionState()
Destructor.
virtual void setOutputScreen(bool output)
bool operator<=(const SolutionState< Scalar > &ss) const
Less than or equal to comparison for sorting based on time.
virtual Teuchos::RCP< SolutionState< Scalar > > clone() const
This is a deep copy constructor.
virtual void computeNorms(const Teuchos::RCP< const SolutionState< Scalar > > &ssIn=Teuchos::null)
Compute the solution norms, and solution change from ssIn, if provided.
virtual Teuchos::RCP< const SolutionStateMetaData< Scalar > > getMetaData() const
bool operator<(const SolutionState< Scalar > &ss) const
Less than comparison for sorting based on time.
virtual Scalar getDxNormL2Abs() const
virtual Scalar getErrorRel() const
virtual bool getIsInterpolated() const
virtual void setOrder(int order)
virtual bool getAccuracy() const
virtual void setX(Teuchos::RCP< Thyra::VectorBase< Scalar > > x)
virtual void setPhysicsState(const Teuchos::RCP< PhysicsState< Scalar > > &ps)
virtual void setXDotDot(Teuchos::RCP< const Thyra::VectorBase< Scalar > > xdotdot)
#define TEUCHOS_ASSERT(assertion_test)
virtual void setMetaData(Teuchos::RCP< SolutionStateMetaData< Scalar > > md)
virtual Status getSolutionStatus() const
virtual void setMetaData(Teuchos::RCP< const SolutionStateMetaData< Scalar > > md)
virtual Scalar getTimeStep() const
virtual Teuchos::RCP< Thyra::VectorBase< Scalar > > getX()
virtual void setTime(Scalar time)
virtual void setPhysicsState(Teuchos::RCP< PhysicsState< Scalar > > &ps)
virtual void setComputeNorms(bool computeNorms)
virtual Teuchos::RCP< const Thyra::VectorBase< Scalar > > getXDotDot() const
Teuchos::RCP< const Thyra::VectorBase< Scalar > > xdot_
Time derivative of the solution.
virtual void setOutput(bool output)
virtual std::string description() const
Solution state for integrators and steppers.
virtual void setTolRel(Scalar tolRel)
Teuchos::RCP< SolutionStateMetaData< Scalar > > metaData_nc_
virtual void copy(const Teuchos::RCP< const SolutionState< Scalar > > &ss)
This is a deep copy.