9 #ifndef Tempus_SolutionState_decl_hpp
10 #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"
55 template<
class Scalar>
57 public Teuchos::Describable,
58 public Teuchos::VerboseObject<Tempus::SolutionState<Scalar> >
70 const Teuchos::RCP<Thyra::VectorBase<Scalar> >& x,
71 const Teuchos::RCP<Thyra::VectorBase<Scalar> >& xdot = Teuchos::null,
72 const Teuchos::RCP<Thyra::VectorBase<Scalar> >& xddot = Teuchos::null,
77 const Teuchos::RCP<
const Thyra::VectorBase<Scalar> >& x,
78 const Teuchos::RCP<
const Thyra::VectorBase<Scalar> >& xdot = Teuchos::null,
79 const Teuchos::RCP<
const Thyra::VectorBase<Scalar> >& xddot= Teuchos::null,
85 const Teuchos::RCP<Thyra::VectorBase<Scalar> >& x,
86 const Teuchos::RCP<Thyra::VectorBase<Scalar> >& xdot,
87 const Teuchos::RCP<Thyra::VectorBase<Scalar> >& xdotdot,
93 const Teuchos::RCP<
const Thyra::VectorBase<Scalar> >& x,
94 const Teuchos::RCP<
const Thyra::VectorBase<Scalar> >& xdot,
95 const Teuchos::RCP<
const Thyra::VectorBase<Scalar> >& xdotdot,
100 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& model,
108 virtual Teuchos::RCP<SolutionState<Scalar> >
clone()
const;
122 virtual Teuchos::RCP<const SolutionStateMetaData<Scalar> >
124 virtual Teuchos::RCP<SolutionStateMetaData<Scalar> >
getMetaData()
133 {
return metaData_->getNRunningFailures(); }
135 {
return metaData_->getNConsecutiveFailures(); }
137 {
return metaData_->getSolutionStatus(); }
161 if (sStatus.solveStatus == Thyra::SOLVE_STATUS_CONVERGED )
177 virtual Teuchos::RCP<Thyra::VectorBase<Scalar> >
getX()
178 { TEUCHOS_ASSERT(
x_nc_ != Teuchos::null);
180 virtual Teuchos::RCP<const Thyra::VectorBase<Scalar> >
getX()
const
182 virtual Teuchos::RCP<Thyra::VectorBase<Scalar> >
getXDot()
184 virtual Teuchos::RCP<const Thyra::VectorBase<Scalar> >
getXDot()
const
186 virtual Teuchos::RCP<Thyra::VectorBase<Scalar> >
getXDotDot()
188 virtual Teuchos::RCP<const Thyra::VectorBase<Scalar> >
getXDotDot()
const
205 virtual void setX(Teuchos::RCP<Thyra::VectorBase<Scalar> > x)
207 virtual void setX(Teuchos::RCP<
const Thyra::VectorBase<Scalar> > x)
208 {
x_nc_ = Teuchos::null;
x_ = x; }
209 virtual void setXDot(Teuchos::RCP<Thyra::VectorBase<Scalar> > xdot)
211 virtual void setXDot(Teuchos::RCP<
const Thyra::VectorBase<Scalar> > xdot)
213 virtual void setXDotDot(Teuchos::RCP<Thyra::VectorBase<Scalar> > xdotdot)
215 virtual void setXDotDot(Teuchos::RCP<
const Thyra::VectorBase<Scalar> > xdotdot)
226 bool operator< (const SolutionState<Scalar>& ss)
const;
229 bool operator<= (const SolutionState<Scalar>& ss)
const;
259 virtual void describe(Teuchos::FancyOStream &out,
260 const Teuchos::EVerbosityLevel verbLevel)
const;
267 Teuchos::RCP<const SolutionStateMetaData<Scalar> >
metaData_;
271 Teuchos::RCP<const Thyra::VectorBase<Scalar> >
x_;
272 Teuchos::RCP<Thyra::VectorBase<Scalar> >
x_nc_;
275 Teuchos::RCP<const Thyra::VectorBase<Scalar> >
xdot_;
279 Teuchos::RCP<const Thyra::VectorBase<Scalar> >
xdotdot_;
293 #endif // Tempus_SolutionState_decl_hpp
virtual Scalar getOrder() const
PhysicsState is a simple class to hold information about the physics.
virtual Teuchos::RCP< const Thyra::VectorBase< Scalar > > getXDot() const
virtual Teuchos::RCP< StepperState< Scalar > > getStepperState()
virtual Scalar getNRunningFailures() const
Teuchos::RCP< Thyra::VectorBase< Scalar > > xdot_nc_
virtual Scalar getNConsecutiveFailures() const
virtual Teuchos::RCP< Thyra::VectorBase< Scalar > > getXDot()
virtual void setXDot(Teuchos::RCP< const Thyra::VectorBase< Scalar > > xdot)
Teuchos::RCP< const SolutionStateMetaData< Scalar > > metaData_
Meta Data for the solution state.
Teuchos::RCP< Tempus::PhysicsState< Scalar > > physicsState_nc_
virtual Scalar getIndex() const
Teuchos::RCP< const Tempus::StepperState< Scalar > > stepperState_
StepperState for this SolutionState.
virtual void setIsSynced(bool isSynced)
virtual void setXDot(Teuchos::RCP< Thyra::VectorBase< Scalar > > xdot)
virtual Teuchos::RCP< const Thyra::VectorBase< Scalar > > getX() const
Teuchos::RCP< const Thyra::VectorBase< Scalar > > xdotdot_
Second time derivative of the solution.
virtual bool getOutput() const
Teuchos::RCP< const Tempus::PhysicsState< Scalar > > physicsState_
PhysicsState for this SolutionState.
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
Less than comparison for sorting based on time.
Status
Status for the Integrator, the Stepper and the SolutionState.
virtual void setSolutionStatus(const Thyra::SolveStatus< Scalar > sStatus)
virtual void setTimeStep(Scalar dt)
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 bool getIsSynced() const
bool operator>=(const SolutionState< Scalar > &ss) const
Less than comparison for sorting based on time.
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.
virtual Teuchos::RCP< SolutionStateMetaData< Scalar > > getMetaData()
virtual ~SolutionState()
Destructor.
bool operator<=(const SolutionState< Scalar > &ss) const
Less than comparison for sorting based on time.
virtual Teuchos::RCP< SolutionState< Scalar > > clone() const
This is a deep copy constructor.
virtual Teuchos::RCP< const SolutionStateMetaData< Scalar > > getMetaData() const
bool operator<(const SolutionState< Scalar > &ss) const
Less than comparison for sorting based on time.
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)
virtual void setMetaData(Teuchos::RCP< SolutionStateMetaData< Scalar > > md)
virtual Status getSolutionStatus() const
virtual void setMetaData(Teuchos::RCP< const SolutionStateMetaData< Scalar > > md)
virtual void setOrder(Scalar order)
virtual Scalar getTimeStep() const
virtual Teuchos::RCP< Thyra::VectorBase< Scalar > > getX()
virtual void setTime(Scalar time)
Teuchos::RCP< Tempus::StepperState< Scalar > > stepperState_nc_
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. SolutionState contains the metadata for solutions and th...
Teuchos::RCP< SolutionStateMetaData< Scalar > > metaData_nc_
virtual void copy(const Teuchos::RCP< const SolutionState< Scalar > > &ss)
This is a deep copy.