Tempus  Version of the Day
Time Integration
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Tempus_PhysicsState_impl.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_impl_hpp
10 #define Tempus_PhysicsState_impl_hpp
11 
12 #include "Teuchos_VerboseObject.hpp"
13 #include "Teuchos_Describable.hpp"
14 #include <string>
15 
16 namespace Tempus {
17 
18 template <class Scalar>
19 PhysicsState<Scalar>::PhysicsState(std::string pN) : physicsName_(pN)
20 {
21 }
22 
23 template <class Scalar>
25 {
28 
29  pSB->setName(this->getName());
30 
31  return pSB;
32 }
33 
34 template <class Scalar>
36  const Teuchos::RCP<const PhysicsState<Scalar> >& pS)
37 {
38  physicsName_ = pS->getName();
39 }
40 
41 template <class Scalar>
42 std::string PhysicsState<Scalar>::getName() const
43 {
44  return physicsName_;
45 }
46 
47 template <class Scalar>
48 void PhysicsState<Scalar>::setName(std::string pN)
49 {
50  physicsName_ = pN;
51 }
52 
53 template <class Scalar>
55 {
56  return "Tempus::PhysicsState - '" + physicsName_ + "'";
57 }
58 
59 template <class Scalar>
62  const Teuchos::EVerbosityLevel /* verbLevel */) const
63 {
64  auto l_out = Teuchos::fancyOStream(out.getOStream());
65  Teuchos::OSTab ostab(*l_out, 2, this->description());
66  l_out->setOutputToRootOnly(0);
67 
68  *l_out << "\n--- " << this->description() << " ---" << std::endl;
69 }
70 
71 } // namespace Tempus
72 #endif // Tempus_PhysicsState_impl_hpp
PhysicsState is a simple class to hold information about the physics.
virtual void describe(Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel) const
PhysicsState(std::string pN="Tempus::PhysicsState")
Constructor.
virtual Teuchos::RCP< PhysicsState< Scalar > > clone() const
Clone constructor.
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
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.
RCP< std::basic_ostream< char_type, traits_type > > getOStream()
virtual void setName(std::string pN)
Set name of PhysicsState.