Tempus  Version of the Day
Time Integration
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Tempus_PhysicsState_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_PhysicsState_hpp
10 #define Tempus_PhysicsState_hpp
11 
12 #include "Teuchos_VerboseObject.hpp"
13 #include "Teuchos_Describable.hpp"
14 #include <string>
15 
16 
17 namespace Tempus {
18 
19 template<class Scalar>
20 /** \brief PhysicsState is a simple class to hold information about the physics.
21  *
22  * <b>Design Considerations</b>
23  * - The purpose of PhysicsState is to provide a means to store any physics
24  * information that is required to restart from a checkpoint.
25  * - The PhysicsState should be held by the SolutionState so that it has
26  * all the information needed to restart the solution.
27  * - Many Physics will simply need this base class, because
28  * they do not have any other additional state information.
29  * - PhysicsState can be inherited to expand the state information.
30  * - Examples of other information that could be included in derived
31  * PhysicsStates:
32  * - Specialized data structures (e.g., particle lists)
33  * - The base class currently has a name so the Physics can be checked to
34  * see if PhysicsState matches the current physics.
35  */
36 class PhysicsState :
37  public Teuchos::Describable,
38  public Teuchos::VerboseObject<Tempus::PhysicsState<Scalar> >
39 {
40 public:
41 
42  /// Constructor
43  PhysicsState(std::string pN = "Tempus::PhysicsState");
44 
45  /// Destructor
46  virtual ~PhysicsState() {}
47 
48  /// Clone constructor
49  virtual Teuchos::RCP<PhysicsState<Scalar> > clone() const;
50 
51  /// This is a deep copy
52  virtual void copy(const Teuchos::RCP<const PhysicsState<Scalar> >& pS);
53 
54  /// Return name of PhysicsState
55  virtual std::string getName() const;
56 
57  /// Set name of PhysicsState
58  virtual void setName(std::string pN);
59 
60  /// \name Overridden from Teuchos::Describable
61  //@{
62  virtual std::string description() const;
63 
64  virtual void describe(Teuchos::FancyOStream & out,
65  const Teuchos::EVerbosityLevel verbLevel) const;
66  //@}
67 
68 protected:
69 
70  std::string physicsName_; ///< Name of the creating Physics.
71 
72 };
73 } // namespace Tempus
74 #endif // Tempus_PhysicsState_hpp
PhysicsState is a simple class to hold information about the physics.
virtual void describe(Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel) const
virtual ~PhysicsState()
Destructor.
PhysicsState(std::string pN="Tempus::PhysicsState")
Constructor.
virtual Teuchos::RCP< PhysicsState< Scalar > > clone() const
Clone constructor.
virtual void copy(const Teuchos::RCP< const PhysicsState< Scalar > > &pS)
This is a deep copy.
virtual std::string description() const
virtual std::string getName() const
Return name of PhysicsState.
virtual void setName(std::string pN)
Set name of PhysicsState.
std::string physicsName_
Name of the creating Physics.