Tempus  Version of the Day
Time Integration
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Tempus_StepperForwardEuler_decl.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_StepperForwardEuler_decl_hpp
11 #define Tempus_StepperForwardEuler_decl_hpp
12 
13 #include "Tempus_config.hpp"
14 #include "Tempus_StepperExplicit.hpp"
16 
17 namespace Tempus {
18 
76 template <class Scalar>
77 class StepperForwardEuler : virtual public Tempus::StepperExplicit<Scalar> {
78  public:
85 
88  const Teuchos::RCP<const Thyra::ModelEvaluator<Scalar> >& appModel,
89  bool useFSAL, std::string ICConsistency, bool ICConsistencyCheck,
91  stepperFEAppAction);
92 
93  virtual void setAppAction(
95 
97  const
98  {
99  return stepperFEAppAction_;
100  }
101 
103  virtual void setInitialConditions(
104  const Teuchos::RCP<SolutionHistory<Scalar> >& solutionHistory);
105 
107  virtual void takeStep(
108  const Teuchos::RCP<SolutionHistory<Scalar> >& solutionHistory);
109 
112  virtual Scalar getOrder() const { return 1.0; }
113  virtual Scalar getOrderMin() const { return 1.0; }
114  virtual Scalar getOrderMax() const { return 1.0; }
115  virtual void setUseFSAL(bool a)
116  {
117  this->useFSAL_ = a;
118  this->isInitialized_ = false;
119  }
120  virtual OrderODE getOrderODE() const { return FIRST_ORDER_ODE; }
122 
124 
125  virtual void describe(Teuchos::FancyOStream& out,
126  const Teuchos::EVerbosityLevel verbLevel) const;
128 
129  virtual bool isValidSetup(Teuchos::FancyOStream& out) const;
130 
131  protected:
133 };
134 
136 // ------------------------------------------------------------------------
137 template <class Scalar>
139  const Teuchos::RCP<const Thyra::ModelEvaluator<Scalar> >& model,
141 
142 } // namespace Tempus
143 
144 #endif // Tempus_StepperForwardEuler_decl_hpp
virtual void describe(Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel) const
virtual void setInitialConditions(const Teuchos::RCP< SolutionHistory< Scalar > > &solutionHistory)
Set the initial conditions, make them consistent, and set needed memory.
virtual Teuchos::RCP< StepperForwardEulerAppAction< Scalar > > getAppAction() const
bool isInitialized_
True if stepper&#39;s member data is initialized.
Teuchos::RCP< StepperForwardEuler< Scalar > > createStepperForwardEuler(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &model, Teuchos::RCP< Teuchos::ParameterList > pl)
Nonmember constructor - ModelEvaluator and ParameterList.
bool useFSAL_
Use First-Same-As-Last (FSAL) principle.
Application Action for StepperForwardEuler.
SolutionHistory is basically a container of SolutionStates. SolutionHistory maintains a collection of...
virtual Teuchos::RCP< Tempus::StepperState< Scalar > > getDefaultStepperState()
Get a default (initial) StepperState.
virtual bool isValidSetup(Teuchos::FancyOStream &out) const
Stepper integrates first-order ODEs.
virtual void setAppAction(Teuchos::RCP< StepperForwardEulerAppAction< Scalar > > appAction)
virtual void takeStep(const Teuchos::RCP< SolutionHistory< Scalar > > &solutionHistory)
Take the specified timestep, dt, and return true if successful.
Teuchos::RCP< StepperForwardEulerAppAction< Scalar > > stepperFEAppAction_
Thyra Base interface for implicit time steppers.