10 #ifndef Tempus_StepperBackwardEuler_decl_hpp
11 #define Tempus_StepperBackwardEuler_decl_hpp
13 #include "Tempus_config.hpp"
14 #include "Tempus_StepperImplicit.hpp"
74 template <
class Scalar>
91 std::string ICConsistency,
bool ICConsistencyCheck,
bool zeroInitialGuess,
126 virtual Scalar
getOrder()
const override {
return 1.0; }
142 virtual Scalar
getAlpha(
const Scalar dt)
const override
144 return Scalar(1.0) / dt;
147 virtual Scalar
getBeta(
const Scalar)
const override {
return Scalar(1.0); }
173 const int param_index)
const override;
178 const int param_index,
const int deriv_index)
const override;
183 const int param_index)
const override;
188 const int param_index)
const override;
197 const int param_index,
const int deriv_index = 0)
const;
212 template <
typename Scalar>
232 xDotDot = Teuchos::null;
234 Thyra::V_StVpStV(xDot.ptr(),
s_, *x, -
s_, *
xOld_);
251 template <
class Scalar>
258 #endif // Tempus_StepperBackwardEuler_decl_hpp
Teuchos::RCP< const Thyra::VectorBase< Scalar > > xOld_
Teuchos::RCP< StepperBackwardEulerAppAction< Scalar > > stepperBEAppAction_
void computeStepResidDerivImpl(const Thyra::ModelEvaluatorBase::OutArgs< Scalar > &outArgs, const Teuchos::Array< Teuchos::RCP< const Thyra::VectorBase< Scalar > > > &x, const Teuchos::Array< Scalar > &t, const Thyra::VectorBase< Scalar > &p, const int param_index, const int deriv_index=0) const
Implementation of computeStep*() methods.
StepperBackwardEuler()
Default constructor.
virtual ~StepperBackwardEulerTimeDerivative()
Destructor.
virtual void compute(Teuchos::RCP< const Thyra::VectorBase< Scalar > > x, Teuchos::RCP< Thyra::VectorBase< Scalar > > xDot, Teuchos::RCP< Thyra::VectorBase< Scalar > > xDotDot=Teuchos::null)
Compute the time derivative.
virtual bool isExplicit() const override
virtual OrderODE getOrderODE() const override
virtual void computePredictor(const Teuchos::RCP< SolutionHistory< Scalar > > &solutionHistory)
Compute predictor given the supplied stepper.
virtual void computeStepParamDeriv(Thyra::LinearOpBase< Scalar > &deriv, const Teuchos::Array< Teuchos::RCP< const Thyra::VectorBase< Scalar > > > &x, const Teuchos::Array< Scalar > &t, const Thyra::VectorBase< Scalar > &p, const int param_index) const override
Compute time step derivative w.r.t. model parameters.
virtual Scalar getBeta(const Scalar) const override
Return beta = d(x)/dx.
virtual void computeStepResidual(Thyra::VectorBase< Scalar > &residual, const Teuchos::Array< Teuchos::RCP< const Thyra::VectorBase< Scalar > > > &x, const Teuchos::Array< Scalar > &t, const Thyra::VectorBase< Scalar > &p, const int param_index) const override
Compute time step residual.
Application Action for StepperBackwardEuler.
virtual void computeStepSolver(Thyra::LinearOpWithSolveBase< Scalar > &jacobian_solver, const Teuchos::Array< Teuchos::RCP< const Thyra::VectorBase< Scalar > > > &x, const Teuchos::Array< Scalar > &t, const Thyra::VectorBase< Scalar > &p, const int param_index) const override
Compute time step Jacobian solver.
Thyra Base interface for time steppers.
Thyra Base interface for implicit time steppers.
virtual void takeStep(const Teuchos::RCP< SolutionHistory< Scalar > > &solutionHistory) override
Take the specified timestep, dt, and return true if successful.
virtual bool isValidSetup(Teuchos::FancyOStream &out) const override
virtual bool isImplicit() const override
virtual bool isOneStepMethod() const override
virtual bool isMultiStepMethod() const override
Teuchos::RCP< const Teuchos::ParameterList > getValidParameters() const override
Return a valid ParameterList with current settings.
void setPredictor(std::string predictorType="None")
Set the predictor.
virtual Teuchos::RCP< Tempus::StepperState< Scalar > > getDefaultStepperState() override
Get a default (initial) StepperState.
virtual Scalar getOrderMin() const override
virtual Scalar getAlpha(const Scalar dt) const override
Return alpha = d(xDot)/dx.
Backward Euler time stepper.
SolutionHistory is basically a container of SolutionStates. SolutionHistory maintains a collection of...
Teuchos::RCP< Stepper< Scalar > > predictorStepper_
virtual void setAppAction(Teuchos::RCP< StepperBackwardEulerAppAction< Scalar > > appAction)
virtual void computeStepJacobian(Thyra::LinearOpBase< Scalar > &jacobian, const Teuchos::Array< Teuchos::RCP< const Thyra::VectorBase< Scalar > > > &x, const Teuchos::Array< Scalar > &t, const Thyra::VectorBase< Scalar > &p, const int param_index, const int deriv_index) const override
Compute time step Jacobian.
virtual void describe(Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel) const override
virtual bool isExplicitImplicit() const override
Stepper integrates first-order ODEs.
StepperBackwardEulerTimeDerivative(Scalar s, Teuchos::RCP< const Thyra::VectorBase< Scalar > > xOld)
Constructor.
virtual void setInitialConditions(const Teuchos::RCP< SolutionHistory< Scalar > > &solutionHistory) override
Set the initial conditions and make them consistent.
virtual Teuchos::RCP< StepperBackwardEulerAppAction< Scalar > > getAppAction() const
virtual Scalar getOrder() const override
virtual Scalar getOrderMax() const override
This interface defines the time derivative connection between an implicit Stepper and WrapperModelEva...
Teuchos::RCP< StepperBackwardEuler< Scalar > > createStepperBackwardEuler(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &model, Teuchos::RCP< Teuchos::ParameterList > pl)
Nonmember constructor - ModelEvaluator and ParameterList.
virtual void setModel(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &appModel) override
Set the model.
virtual void initialize(Scalar s, Teuchos::RCP< const Thyra::VectorBase< Scalar > > xOld)
Stepper interface to support full-space optimization.
Time-derivative interface for Backward Euler.
virtual int stencilLength() const override
Return the number of solution vectors in the time step stencil.