Tempus  Version of the Day
Time Integration
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Tempus_SolutionState_decl.hpp
Go to the documentation of this file.
1 // @HEADER
2 // ****************************************************************************
3 // Tempus: Copyright (2017) Sandia Corporation
4 //
5 // Distributed under BSD 3-clause license (See accompanying file Copyright.txt)
6 // ****************************************************************************
7 // @HEADER
8 
9 #ifndef Tempus_SolutionState_decl_hpp
10 #define Tempus_SolutionState_decl_hpp
11 
12 // Teuchos
13 #include "Teuchos_VerboseObject.hpp"
14 #include "Teuchos_Describable.hpp"
15 // Thrya
16 #include "Thyra_VectorBase.hpp"
17 #include "Thyra_ModelEvaluator.hpp"
18 // Tempus
19 #include "Tempus_config.hpp"
20 #include "Tempus_SolutionStateMetaData.hpp"
21 #include "Tempus_StepperState.hpp"
22 #include "Tempus_PhysicsState.hpp"
23 
24 namespace Tempus {
25 
26 /** \brief Solution state for integrators and steppers.
27  * SolutionState contains the metadata for solutions and the solutions
28  * themselves.
29  *
30  * For simple time integration, the SolutionState is sufficient for
31  * checkpointing, restart and undo operations (i.e., it is the Memento
32  * object).
33  *
34  * For more complex time integration where the physics has additional
35  * state information or the time integrator is not a one-step method
36  * (i.e., can not accurately start from a single time step), this class
37  * can be inherited and the physics state or additional time-integration
38  * parameters can be managed.
39  *
40  * SolutionStates can be interpolated to generate solutions at various
41  * times (see SolutionHistory). However not all metadata or state
42  * information can be interpolated. Thus interpolated solutions may not
43  * be suitable for checkpointing, restart and undo operations, but may
44  * be useful for adjoint sensitivities.
45  *
46  * The solution vectors, \f$x\f$, \f$\dot{x}\f$, and \f$\ddot{x}\f$, in
47  * SolutionState can be null pointers. This indicates that the
48  * application does not need them, so do not storage them. This can be
49  * a huge savings when saving many states in the solution history.
50  * Some Steppers will need temporary memory to store time derivative(s)
51  * (\f$\dot{x}\f$, or \f$\ddot{x}\f$) for evaluation of the ODE/DAE
52  * (\f$f(x, \dot{x}, \ddot{x},t)\f$), but each individual Stepper will
53  * manage that.
54  */
55 template<class Scalar>
57  public Teuchos::Describable,
58  public Teuchos::VerboseObject<Tempus::SolutionState<Scalar> >
59 {
60 public:
61 
62  /** \brief Default Constructor -- Not meant for immediate adding to SolutionHistory.
63  * This constructor does not set the solution vectors, x, xdot and xdotdot.
64  * which should be set via setX(), setXDot(), and/or setXDotDot() prior
65  * to being added to SolutionHistory.
66  */
67  SolutionState();
68 
69 #ifndef TEMPUS_HIDE_DEPRECATED_CODE
71  const Teuchos::RCP<Thyra::VectorBase<Scalar> >& x,
72  const Teuchos::RCP<Thyra::VectorBase<Scalar> >& xdot = Teuchos::null,
73  const Teuchos::RCP<Thyra::VectorBase<Scalar> >& xddot = Teuchos::null,
74  const Teuchos::RCP<StepperState<Scalar> >& stepperState = Teuchos::null,
75  const Teuchos::RCP<PhysicsState<Scalar> >& physicsState = Teuchos::null);
76 
78  const Teuchos::RCP<const Thyra::VectorBase<Scalar> >& x,
79  const Teuchos::RCP<const Thyra::VectorBase<Scalar> >& xdot = Teuchos::null,
80  const Teuchos::RCP<const Thyra::VectorBase<Scalar> >& xddot= Teuchos::null,
81  const Teuchos::RCP<const StepperState<Scalar> >& stepperSt = Teuchos::null,
82  const Teuchos::RCP<const PhysicsState<Scalar> >& physicsSt = Teuchos::null);
83 #endif
84 
86  const Teuchos::RCP<SolutionStateMetaData<Scalar> > ssmd,
87  const Teuchos::RCP<Thyra::VectorBase<Scalar> >& x,
88  const Teuchos::RCP<Thyra::VectorBase<Scalar> >& xdot,
89  const Teuchos::RCP<Thyra::VectorBase<Scalar> >& xdotdot,
90  const Teuchos::RCP<StepperState<Scalar> >& stepperState,
91  const Teuchos::RCP<PhysicsState<Scalar> >& physicsState);
92 
94  const Teuchos::RCP<const SolutionStateMetaData<Scalar> > ssmd,
95  const Teuchos::RCP<const Thyra::VectorBase<Scalar> >& x,
96  const Teuchos::RCP<const Thyra::VectorBase<Scalar> >& xdot,
97  const Teuchos::RCP<const Thyra::VectorBase<Scalar> >& xdotdot,
98  const Teuchos::RCP<const StepperState<Scalar> >& stepperState,
99  const Teuchos::RCP<const PhysicsState<Scalar> >& physicsState);
100 
101 #ifndef TEMPUS_HIDE_DEPRECATED_CODE
103  const Teuchos::RCP<const Thyra::ModelEvaluator<Scalar> >& model,
104  const Teuchos::RCP<StepperState<Scalar> >& stepperState = Teuchos::null,
105  const Teuchos::RCP<PhysicsState<Scalar> >& physicsState = Teuchos::null);
106 #endif
107 
108  /// This is a shallow copy constructor, use clone for a deep copy constructor
110 
111  /// This is a deep copy constructor
112  virtual Teuchos::RCP<SolutionState<Scalar> > clone() const;
113 
114  /// This is a deep copy
115  virtual void copy(const Teuchos::RCP<const SolutionState<Scalar> >& ss);
116 
117  /// Deep copy solution data, but keep metaData untouched.
118  virtual void copySolutionData(
119  const Teuchos::RCP<const SolutionState<Scalar> >& s);
120 
121  /// Destructor
122  virtual ~SolutionState() {}
123 
124  /// \name Get MetaData values
125  //@{
126  virtual Teuchos::RCP<const SolutionStateMetaData<Scalar> >
127  getMetaData() const { return metaData_; }
128  virtual Teuchos::RCP<SolutionStateMetaData<Scalar> > getMetaData()
129  { TEUCHOS_ASSERT(metaData_nc_ != Teuchos::null);
130  return metaData_nc_; }
131 
132  virtual Scalar getTime() const {return metaData_->getTime();}
133  virtual int getIndex() const {return metaData_->getIStep();}
134  virtual Scalar getTimeStep() const {return metaData_->getDt();}
135  virtual Scalar getErrorAbs() const {return metaData_->getErrorAbs();}
136  virtual Scalar getErrorRel() const {return metaData_->getErrorRel();}
137  virtual int getOrder() const {return metaData_->getOrder();}
138  virtual int getNFailures() const {return metaData_->getNFailures();}
139  virtual int getNRunningFailures() const {return metaData_->getNRunningFailures();}
140  virtual int getNConsecutiveFailures() const {return metaData_->getNConsecutiveFailures();}
141  virtual Scalar getTolAbs() const {return metaData_->getTolAbs();}
142  virtual Scalar getTolRel() const {return metaData_->getTolRel();}
143  virtual Scalar getXNormL2() const {return metaData_->getXNormL2();}
144  virtual Scalar getDxNormL2Abs() const {return metaData_->getDxNormL2Abs();}
145  virtual Scalar getDxNormL2Rel() const {return metaData_->getDxNormL2Rel();}
146  virtual bool getComputeNorms() const {return metaData_->getComputeNorms();}
147  virtual Status getSolutionStatus() const {return metaData_->getSolutionStatus();}
148  virtual bool getOutput() const {return metaData_->getOutput();}
149  virtual bool getOutputScreen() const {return metaData_->getOutputScreen();}
150  virtual bool getIsSynced() const {return metaData_->getIsSynced();}
151  virtual bool getIsInterpolated() const {return metaData_->getIsInterpolated();}
152  virtual bool getAccuracy() const {return metaData_->getAccuracy();}
153  //@}
154 
155  /// \name Set MetaData values
156  //@{
157  virtual void setMetaData(
158  Teuchos::RCP<const SolutionStateMetaData<Scalar> > md)
159  { metaData_ = md; metaData_nc_ = Teuchos::null; }
160  virtual void setMetaData(Teuchos::RCP<SolutionStateMetaData<Scalar> > md)
161  { metaData_nc_ = md; metaData_ = metaData_nc_; }
162 
163  virtual void setTime(Scalar time) { TEUCHOS_ASSERT(metaData_nc_ != Teuchos::null);
164  metaData_nc_->setTime(time);}
165  virtual void setIndex(Scalar index) { TEUCHOS_ASSERT(metaData_nc_ != Teuchos::null);
166  metaData_nc_->setIStep(index);}
167  virtual void setTimeStep(Scalar dt) { TEUCHOS_ASSERT(metaData_nc_ != Teuchos::null);
168  metaData_nc_->setDt(dt);}
169  virtual void setErrorAbs(Scalar errorAbs){ TEUCHOS_ASSERT(metaData_nc_ != Teuchos::null);
170  metaData_nc_->setErrorAbs(errorAbs);}
171  virtual void setErrorRel(Scalar errorRel){ TEUCHOS_ASSERT(metaData_nc_ != Teuchos::null);
172  metaData_nc_->setErrorRel(errorRel);}
173  virtual void setOrder(int order) { TEUCHOS_ASSERT(metaData_nc_ != Teuchos::null);
174  metaData_nc_->setOrder(order); }
175 
176  virtual void setNFailures(int nFailures) { TEUCHOS_ASSERT(metaData_nc_ != Teuchos::null);
177  metaData_nc_->setNFailures(nFailures); }
178  virtual void setNRunningFailures(int nFailures) { TEUCHOS_ASSERT(metaData_nc_ != Teuchos::null);
179  metaData_nc_->setNRunningFailures(nFailures); }
180  virtual void setNConsecutiveFailures(int nConsecutiveFailures)
181  { TEUCHOS_ASSERT(metaData_nc_ != Teuchos::null);
182  metaData_nc_->setNConsecutiveFailures(nConsecutiveFailures); }
183  virtual void setTolRel (Scalar tolRel){ TEUCHOS_ASSERT(metaData_nc_ != Teuchos::null);
184  metaData_nc_->setTolRel(tolRel); }
185  virtual void setTolAbs (Scalar tolAbs){ TEUCHOS_ASSERT(metaData_nc_ != Teuchos::null);
186  metaData_nc_->setTolAbs(tolAbs); }
187 
188  virtual void setXNormL2 (Scalar xNormL2){ TEUCHOS_ASSERT(metaData_nc_ != Teuchos::null);
189  metaData_nc_->setXNormL2(xNormL2); }
190  virtual void setDxNormL2Rel (Scalar dxNormL2Rel){ TEUCHOS_ASSERT(metaData_nc_ != Teuchos::null);
191  metaData_nc_->setDxNormL2Rel(dxNormL2Rel); }
192  virtual void setDxNormL2Abs (Scalar dxNormL2Abs){ TEUCHOS_ASSERT(metaData_nc_ != Teuchos::null);
193  metaData_nc_->setDxNormL2Abs(dxNormL2Abs); }
194  virtual void setComputeNorms(bool computeNorms) { TEUCHOS_ASSERT(metaData_nc_ != Teuchos::null);
195  metaData_nc_->setComputeNorms(computeNorms); }
196 
197  virtual void setSolutionStatus(Status s) { TEUCHOS_ASSERT(metaData_nc_ != Teuchos::null);
198  metaData_nc_->setSolutionStatus(s); }
199  virtual void setSolutionStatus(const Thyra::SolveStatus<Scalar> sStatus)
200  {
201  if (sStatus.solveStatus == Thyra::SOLVE_STATUS_CONVERGED )
202  metaData_nc_->setSolutionStatus(Status::PASSED);
203  else
204  metaData_nc_->setSolutionStatus(Status::FAILED);
205  }
206 
207  virtual void setOutput(bool output) { TEUCHOS_ASSERT(metaData_nc_ != Teuchos::null);
208  metaData_nc_->setOutput(output); }
209  virtual void setOutputScreen(bool output) { TEUCHOS_ASSERT(metaData_nc_ != Teuchos::null);
210  metaData_nc_->setOutputScreen(output); }
211  virtual void setIsSynced(bool isSynced) { TEUCHOS_ASSERT(metaData_nc_ != Teuchos::null);
212  metaData_nc_->setIsSynced(isSynced); }
213  virtual void setIsInterpolated(bool isInterpolated) { TEUCHOS_ASSERT(metaData_nc_ != Teuchos::null);
214  metaData_nc_->setIsInterpolated(isInterpolated); }
215  virtual void setAccuracy(bool accuracy) { TEUCHOS_ASSERT(metaData_nc_ != Teuchos::null);
216  metaData_nc_->setAccuracy(accuracy); }
217  //@}
218 
219  /// \name Get State Data
220  //@{
221  virtual Teuchos::RCP<Thyra::VectorBase<Scalar> > getX()
222  { TEUCHOS_ASSERT(x_nc_ != Teuchos::null);
223  return x_nc_; }
224  virtual Teuchos::RCP<const Thyra::VectorBase<Scalar> > getX() const
225  { return x_; }
226  virtual Teuchos::RCP<Thyra::VectorBase<Scalar> > getXDot()
227  { return xdot_nc_; }
228  virtual Teuchos::RCP<const Thyra::VectorBase<Scalar> > getXDot() const
229  { return xdot_; }
230  virtual Teuchos::RCP<Thyra::VectorBase<Scalar> > getXDotDot()
231  { return xdotdot_nc_; }
232  virtual Teuchos::RCP<const Thyra::VectorBase<Scalar> > getXDotDot() const
233  { return xdotdot_; }
234 
235  virtual Teuchos::RCP<StepperState<Scalar> > getStepperState()
236  { TEUCHOS_ASSERT(stepperState_nc_ != Teuchos::null);
237  return stepperState_nc_; }
238  virtual Teuchos::RCP<const StepperState<Scalar> > getStepperState() const
239  { return stepperState_; }
240 
241  virtual Teuchos::RCP<PhysicsState<Scalar> > getPhysicsState()
242  { return physicsState_nc_; }
243  virtual Teuchos::RCP<const PhysicsState<Scalar> > getPhysicsState() const
244  { return physicsState_; }
245  //@}
246 
247  /// \name Set State Data
248  //@{
249  virtual void setX(Teuchos::RCP<Thyra::VectorBase<Scalar> > x)
250  { x_nc_ = x; x_ = x; }
251  virtual void setX(Teuchos::RCP<const Thyra::VectorBase<Scalar> > x)
252  { x_nc_ = Teuchos::null; x_ = x; }
253  virtual void setXDot(Teuchos::RCP<Thyra::VectorBase<Scalar> > xdot)
254  { xdot_nc_ = xdot; xdot_ = xdot; }
255  virtual void setXDot(Teuchos::RCP<const Thyra::VectorBase<Scalar> > xdot)
256  { xdot_nc_ = Teuchos::null; xdot_ = xdot; }
257  virtual void setXDotDot(Teuchos::RCP<Thyra::VectorBase<Scalar> > xdotdot)
258  { xdotdot_nc_ = xdotdot; xdotdot_ = xdotdot; }
259  virtual void setXDotDot(Teuchos::RCP<const Thyra::VectorBase<Scalar> > xdotdot)
260  { xdotdot_nc_ = Teuchos::null; xdotdot_ = xdotdot; }
261 
262  virtual void setStepperState(Teuchos::RCP<StepperState<Scalar> >& ss)
263  { stepperState_nc_ = ss; stepperState_ = ss; }
264  virtual void setStepperState(const Teuchos::RCP<StepperState<Scalar> >& ss)
265  { stepperState_nc_ = Teuchos::null; stepperState_ = ss; }
266 
267  virtual void setPhysicsState(Teuchos::RCP<PhysicsState<Scalar> >& ps)
268  { physicsState_nc_ = ps; physicsState_ = ps; }
269  virtual void setPhysicsState(const Teuchos::RCP<PhysicsState<Scalar> >& ps)
270  { physicsState_nc_ = Teuchos::null; physicsState_ = ps; }
271  //@}
272 
273 
274  /// \name Comparison methods
275  //@{
276  /// Less than comparison for sorting based on time
277  bool operator< (const SolutionState<Scalar>& ss) const;
278 
279  /// Less than comparison for sorting based on time
280  bool operator<= (const SolutionState<Scalar>& ss) const;
281 
282  /// Less than comparison for sorting based on time
283  bool operator< (const Scalar& t) const;
284 
285  /// Less than comparison for sorting based on time
286  bool operator<= (const Scalar& t) const;
287 
288  /// Less than comparison for sorting based on time
289  bool operator> (const SolutionState<Scalar>& ss) const;
290 
291  /// Less than comparison for sorting based on time
292  bool operator>= (const SolutionState<Scalar>& ss) const;
293 
294  /// Less than comparison for sorting based on time
295  bool operator> (const Scalar& t) const;
296 
297  /// Less than comparison for sorting based on time
298  bool operator>= (const Scalar& t) const;
299 
300  /// Equality comparison for matching
301  bool operator== (const SolutionState<Scalar>& ss) const;
302 
303  /// Equality comparison for matching
304  bool operator== (const Scalar& t) const;
305  //@}
306 
307  /// \name Overridden from Teuchos::Describable
308  //@{
309  virtual std::string description() const;
310  virtual void describe(Teuchos::FancyOStream &out,
311  const Teuchos::EVerbosityLevel verbLevel) const;
312  //@}
313 
314  /// Compute the solution norms, and solution change from ssIn, if provided.
315  virtual void computeNorms(
316  const Teuchos::RCP<const SolutionState<Scalar> >& ssIn = Teuchos::null);
317 
318 private:
319  // Member Data
320 
321  /// Meta Data for the solution state
322  Teuchos::RCP<const SolutionStateMetaData<Scalar> > metaData_;
323  Teuchos::RCP<SolutionStateMetaData<Scalar> > metaData_nc_;
324 
325  /// Solution
326  Teuchos::RCP<const Thyra::VectorBase<Scalar> > x_;
327  Teuchos::RCP<Thyra::VectorBase<Scalar> > x_nc_;
328 
329  /// Time derivative of the solution
330  Teuchos::RCP<const Thyra::VectorBase<Scalar> > xdot_;
331  Teuchos::RCP<Thyra::VectorBase<Scalar> > xdot_nc_;
332 
333  /// Second time derivative of the solution
334  Teuchos::RCP<const Thyra::VectorBase<Scalar> > xdotdot_;
335  Teuchos::RCP<Thyra::VectorBase<Scalar> > xdotdot_nc_;
336 
337  /// StepperState for this SolutionState
338  Teuchos::RCP<const StepperState<Scalar> > stepperState_;
339  Teuchos::RCP<StepperState<Scalar> > stepperState_nc_;
340 
341  /// PhysicsState for this SolutionState
342  Teuchos::RCP<const PhysicsState<Scalar> > physicsState_;
343  Teuchos::RCP<PhysicsState<Scalar> > physicsState_nc_;
344 
345 };
346 
347 
348 /// Nonmember constructor from non-const solution vectors, x.
349 template<class Scalar>
350 Teuchos::RCP<SolutionState<Scalar> >
352  const Teuchos::RCP<Thyra::VectorBase<Scalar> >& x,
353  const Teuchos::RCP<Thyra::VectorBase<Scalar> >& xdot = Teuchos::null,
354  const Teuchos::RCP<Thyra::VectorBase<Scalar> >& xdotdot = Teuchos::null);
355 
356 /// Nonmember constructor from const solution vectors, x.
357 template<class Scalar>
358 Teuchos::RCP<SolutionState<Scalar> >
360  const Teuchos::RCP<const Thyra::VectorBase<Scalar> >& x,
361  const Teuchos::RCP<const Thyra::VectorBase<Scalar> >& xdot =Teuchos::null,
362  const Teuchos::RCP<const Thyra::VectorBase<Scalar> >& xdotdot =Teuchos::null);
363 
364 /// Nonmember constructor from Thyra ModelEvaluator.
365 template<class Scalar>
366 Teuchos::RCP<SolutionState<Scalar> >
368  const Teuchos::RCP<const Thyra::ModelEvaluator<Scalar> >& model,
369  const Teuchos::RCP<StepperState<Scalar> >& stepperState = Teuchos::null,
370  const Teuchos::RCP<PhysicsState<Scalar> >& physicsState = Teuchos::null);
371 
372 
373 
374 } // namespace Tempus
375 
376 #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 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)
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 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)
Teuchos::RCP< PhysicsState< Scalar > > physicsState_nc_
virtual Teuchos::RCP< const Thyra::VectorBase< Scalar > > getX() 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 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.
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
Less than 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 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)
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. SolutionState contains the metadata for solutions and th...
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.