Tempus  Version of the Day
Time Integration
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Tempus_StepperLeapfrog_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_StepperLeapfrog_decl_hpp
11 #define Tempus_StepperLeapfrog_decl_hpp
12 
13 #include "Tempus_config.hpp"
14 #include "Tempus_StepperExplicit.hpp"
17 
18 namespace Tempus {
19 
91 template <class Scalar>
92 class StepperLeapfrog : virtual public Tempus::StepperExplicit<Scalar> {
93  public:
100 
103  const Teuchos::RCP<const Thyra::ModelEvaluator<Scalar> >& appModel,
104  bool useFSAL, std::string ICConsistency, bool ICConsistencyCheck,
106  stepperLFAppAction);
107 
109 
110  virtual void setAppAction(
112 
114  {
115  return stepperLFAppAction_;
116  }
117 
119  virtual void setInitialConditions(
120  const Teuchos::RCP<SolutionHistory<Scalar> >& solutionHistory);
121 
123  virtual void takeStep(
124  const Teuchos::RCP<SolutionHistory<Scalar> >& solutionHistory);
125 
128  virtual Scalar getOrder() const { return 2.0; }
129  virtual Scalar getOrderMin() const { return 2.0; }
130  virtual Scalar getOrderMax() const { return 2.0; }
131  virtual Scalar getInitTimeStep(
132  const Teuchos::RCP<SolutionHistory<Scalar> >& /* solutionHistory */) const
133  {
134  return Scalar(1.0e+99);
135  }
136 
137  virtual bool isExplicit() const { return true; }
138  virtual bool isImplicit() const { return false; }
139  virtual bool isExplicitImplicit() const
140  {
141  return isExplicit() && isImplicit();
142  }
143  virtual bool isOneStepMethod() const { return true; }
144  virtual bool isMultiStepMethod() const { return !isOneStepMethod(); }
145  virtual OrderODE getOrderODE() const { return SECOND_ORDER_ODE; }
147 
149 
150  virtual void describe(Teuchos::FancyOStream& out,
151  const Teuchos::EVerbosityLevel verbLevel) const;
153 
154  virtual bool isValidSetup(Teuchos::FancyOStream& out) const;
155 
156  protected:
158 };
159 
161 // ------------------------------------------------------------------------
162 template <class Scalar>
164  const Teuchos::RCP<const Thyra::ModelEvaluator<Scalar> >& model,
166 
167 } // namespace Tempus
168 
169 #endif // Tempus_StepperLeapfrog_decl_hpp
virtual void setInitialConditions(const Teuchos::RCP< SolutionHistory< Scalar > > &solutionHistory)
Set the initial conditions and make them consistent.
Teuchos::RCP< StepperLeapfrog< Scalar > > createStepperLeapfrog(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &model, Teuchos::RCP< Teuchos::ParameterList > pl)
Nonmember constructor - ModelEvaluator and ParameterList.
virtual Scalar getInitTimeStep(const Teuchos::RCP< SolutionHistory< Scalar > > &) const
virtual void takeStep(const Teuchos::RCP< SolutionHistory< Scalar > > &solutionHistory)
Take the specified timestep, dt, and return true if successful.
Stepper integrates second-order ODEs.
Application Action for StepperLeapfrog.
virtual void describe(Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel) const
virtual Teuchos::RCP< Tempus::StepperState< Scalar > > getDefaultStepperState()
Get a default (initial) StepperState.
SolutionHistory is basically a container of SolutionStates. SolutionHistory maintains a collection of...
virtual bool isValidSetup(Teuchos::FancyOStream &out) const
StepperLeapfrog()
Default constructor.
virtual Teuchos::RCP< StepperLeapfrogAppAction< Scalar > > getAppAction() const
Teuchos::RCP< StepperLeapfrogAppAction< Scalar > > stepperLFAppAction_
virtual bool isExplicitImplicit() const
virtual OrderODE getOrderODE() const
virtual void setAppAction(Teuchos::RCP< StepperLeapfrogAppAction< Scalar > > appAction)
Thyra Base interface for implicit time steppers.