Tempus Version of the Day
Time Integration
Loading...
Searching...
No Matches
Tempus_PhysicsState_impl.hpp
Go to the documentation of this file.
1//@HEADER
2// *****************************************************************************
3// Tempus: Time Integration and Sensitivity Analysis Package
4//
5// Copyright 2017 NTESS and the Tempus contributors.
6// SPDX-License-Identifier: BSD-3-Clause
7// *****************************************************************************
8//@HEADER
9
10#ifndef Tempus_PhysicsState_impl_hpp
11#define Tempus_PhysicsState_impl_hpp
12
13#include "Teuchos_VerboseObject.hpp"
14#include "Teuchos_Describable.hpp"
15#include <string>
16
17namespace Tempus {
18
19template <class Scalar>
20PhysicsState<Scalar>::PhysicsState(std::string pN) : physicsName_(pN)
21{
22}
23
24template <class Scalar>
25Teuchos::RCP<PhysicsState<Scalar> > PhysicsState<Scalar>::clone() const
26{
27 Teuchos::RCP<PhysicsState<Scalar> > pSB =
28 Teuchos::rcp(new PhysicsState<Scalar>());
29
30 pSB->setName(this->getName());
31
32 return pSB;
33}
34
35template <class Scalar>
37 const Teuchos::RCP<const PhysicsState<Scalar> >& pS)
38{
39 physicsName_ = pS->getName();
40}
41
42template <class Scalar>
44{
45 return physicsName_;
46}
47
48template <class Scalar>
50{
51 physicsName_ = pN;
52}
53
54template <class Scalar>
56{
57 return "Tempus::PhysicsState - '" + physicsName_ + "'";
58}
59
60template <class Scalar>
62 Teuchos::FancyOStream& out,
63 const Teuchos::EVerbosityLevel /* verbLevel */) const
64{
65 auto l_out = Teuchos::fancyOStream(out.getOStream());
66 Teuchos::OSTab ostab(*l_out, 2, this->description());
67 l_out->setOutputToRootOnly(0);
68
69 *l_out << "\n--- " << this->description() << " ---" << std::endl;
70}
71
72} // namespace Tempus
73#endif // Tempus_PhysicsState_impl_hpp
PhysicsState is a simple class to hold information about the physics.
virtual std::string getName() const
Return name of PhysicsState.
virtual void setName(std::string pN)
Set name of PhysicsState.
virtual std::string description() const
PhysicsState(std::string pN="Tempus::PhysicsState")
Constructor.
virtual void copy(const Teuchos::RCP< const PhysicsState< Scalar > > &pS)
This is a deep copy.
virtual Teuchos::RCP< PhysicsState< Scalar > > clone() const
Clone constructor.
virtual void describe(Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel) const