Tempus  Version of the Day
Time Integration
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Tempus_StepperState.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_StepperState_hpp
11 #define Tempus_StepperState_hpp
12 
13 #include "Teuchos_VerboseObject.hpp"
14 #include "Teuchos_Describable.hpp"
15 #include <string>
16 
17 #include "Tempus_config.hpp"
18 
19 namespace Tempus {
20 
21 template <class Scalar>
40  : public Teuchos::Describable,
41  public Teuchos::VerboseObject<Tempus::StepperState<Scalar> >
42 
43 {
44  public:
46  StepperState(std::string name = "Default") : stepperName_(name) {}
47 
50  {
53  return ss_out;
54  }
55 
57  virtual void copy(const Teuchos::RCP<const StepperState<Scalar> >& ss)
58  {
59  stepperName_ = ss->stepperName_;
60  }
61 
63 
64  virtual std::string description() const
65  {
66  return "Tempus::StepperState - '" + stepperName_ + "'";
67  }
68 
69  virtual void describe(Teuchos::FancyOStream& out,
70  const Teuchos::EVerbosityLevel /* verbLevel */) const
71  {
72  auto l_out = Teuchos::fancyOStream(out.getOStream());
73  Teuchos::OSTab ostab(*l_out, 2, this->description());
74  l_out->setOutputToRootOnly(0);
75 
76  *l_out << "\n--- " << this->description() << " ---" << std::endl;
77  }
79 
80  std::string stepperName_;
81 };
82 } // namespace Tempus
83 #endif // Tempus_StepperState_hpp
virtual std::string description() const
StepperState is a simple class to hold state information about the stepper.
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
virtual void describe(Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel) const
virtual void copy(const Teuchos::RCP< const StepperState< Scalar > > &ss)
This is a deep copy.
RCP< std::basic_ostream< char_type, traits_type > > getOStream()
virtual Teuchos::RCP< StepperState< Scalar > > clone() const
Clone copy constructor.
std::string stepperName_
Name of the creating Stepper.
StepperState(std::string name="Default")
Constructor.