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: Copyright (2017) Sandia Corporation
4 //
5 // Distributed under BSD 3-clause license (See accompanying file Copyright.txt)
6 // ****************************************************************************
7 // @HEADER
8 
9 #ifndef Tempus_StepperLeapfrog_decl_hpp
10 #define Tempus_StepperLeapfrog_decl_hpp
11 
12 #include "Tempus_config.hpp"
13 #include "Tempus_StepperExplicit.hpp"
16 
17 
18 namespace Tempus {
19 
95 template<class Scalar>
96 class StepperLeapfrog : virtual public Tempus::StepperExplicit<Scalar>
97 {
98 public:
99 
105  StepperLeapfrog();
106 
109  const Teuchos::RCP<const Thyra::ModelEvaluator<Scalar> >& appModel,
110  bool useFSAL,
111  std::string ICConsistency,
112  bool ICConsistencyCheck,
113  const Teuchos::RCP<StepperLeapfrogAppAction<Scalar> >& stepperLFAppAction);
114 
116 
117  virtual void setAppAction(
119 
121  { return stepperLFAppAction_; }
122 
124  virtual void setInitialConditions (
125  const Teuchos::RCP<SolutionHistory<Scalar> >& solutionHistory);
126 
128  virtual void takeStep(
129  const Teuchos::RCP<SolutionHistory<Scalar> >& solutionHistory);
130 
133  virtual Scalar getOrder() const {return 2.0;}
134  virtual Scalar getOrderMin() const {return 2.0;}
135  virtual Scalar getOrderMax() const {return 2.0;}
136  virtual Scalar getInitTimeStep(
137  const Teuchos::RCP<SolutionHistory<Scalar> >& /* solutionHistory */) const
138  {return Scalar(1.0e+99);}
139 
140  virtual bool isExplicit() const {return true;}
141  virtual bool isImplicit() const {return false;}
142  virtual bool isExplicitImplicit() const
143  {return isExplicit() && isImplicit();}
144  virtual bool isOneStepMethod() const {return true;}
145  virtual bool isMultiStepMethod() const {return !isOneStepMethod();}
146  virtual OrderODE getOrderODE() const {return SECOND_ORDER_ODE;}
148 
150 
151  virtual void describe(Teuchos::FancyOStream & out,
152  const Teuchos::EVerbosityLevel verbLevel) const;
154 
155  virtual bool isValidSetup(Teuchos::FancyOStream & out) const;
156 
157 protected:
158 
160 
161 };
162 
163 
165 // ------------------------------------------------------------------------
166 template<class Scalar>
169  const Teuchos::RCP<const Thyra::ModelEvaluator<Scalar> >& model,
171 
172 
173 } // namespace Tempus
174 
175 #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.