9 #ifndef Tempus_StepperBackwardEuler_decl_hpp
10 #define Tempus_StepperBackwardEuler_decl_hpp
12 #include "Tempus_StepperImplicit.hpp"
35 template<
class Scalar>
53 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& appModel,
54 Teuchos::RCP<Teuchos::ParameterList> pList = Teuchos::null);
63 void setPredictor(Teuchos::RCP<Teuchos::ParameterList>predPL=Teuchos::null);
93 virtual Scalar
getAlpha(
const Scalar dt)
const {
return Scalar(1.0)/dt; }
95 virtual Scalar
getBeta (
const Scalar )
const {
return Scalar(1.0); }
113 virtual void describe(Teuchos::FancyOStream & out,
114 const Teuchos::EVerbosityLevel verbLevel)
const;
121 Thyra::VectorBase<Scalar>& residual,
122 const Teuchos::Array< Teuchos::RCP<
const Thyra::VectorBase<Scalar> > >& x,
123 const Teuchos::Array<Scalar>& t,
124 const Thyra::VectorBase<Scalar>& p,
125 const int param_index)
const;
127 Thyra::LinearOpBase<Scalar>& jacobian,
128 const Teuchos::Array< Teuchos::RCP<
const Thyra::VectorBase<Scalar> > >& x,
129 const Teuchos::Array<Scalar>& t,
130 const Thyra::VectorBase<Scalar>& p,
131 const int param_index,
132 const int deriv_index)
const;
134 Thyra::LinearOpBase<Scalar>& deriv,
135 const Teuchos::Array< Teuchos::RCP<
const Thyra::VectorBase<Scalar> > >& x,
136 const Teuchos::Array<Scalar>& t,
137 const Thyra::VectorBase<Scalar>& p,
138 const int param_index)
const;
140 Thyra::LinearOpWithSolveBase<Scalar>& jacobian_solver,
141 const Teuchos::Array< Teuchos::RCP<
const Thyra::VectorBase<Scalar> > >& x,
142 const Teuchos::Array<Scalar>& t,
143 const Thyra::VectorBase<Scalar>& p,
144 const int param_index)
const;
151 const Thyra::ModelEvaluatorBase::OutArgs<Scalar>& outArgs,
152 const Teuchos::Array< Teuchos::RCP<
const Thyra::VectorBase<Scalar> > >& x,
153 const Teuchos::Array<Scalar>& t,
154 const Thyra::VectorBase<Scalar>& p,
155 const int param_index,
156 const int deriv_index = 0)
const;
173 template <
typename Scalar>
181 Scalar s, Teuchos::RCP<
const Thyra::VectorBase<Scalar> > xOld)
189 Teuchos::RCP<
const Thyra::VectorBase<Scalar> > x,
190 Teuchos::RCP< Thyra::VectorBase<Scalar> > xDot,
191 Teuchos::RCP< Thyra::VectorBase<Scalar> > xDotDot = Teuchos::null)
193 xDotDot = Teuchos::null;
195 Thyra::V_StVpStV(xDot.ptr(),
s_,*x,-
s_,*
xOld_);
199 Teuchos::RCP<
const Thyra::VectorBase<Scalar> > xOld)
204 Teuchos::RCP<const Thyra::VectorBase<Scalar> >
xOld_;
211 #endif // Tempus_StepperBackwardEuler_decl_hpp
Teuchos::RCP< const Thyra::VectorBase< Scalar > > xOld_
Teuchos::RCP< const Teuchos::ParameterList > getValidParameters() const
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 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
Compute time step residual.
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 Scalar getOrderMax() const
virtual void takeStep(const Teuchos::RCP< SolutionHistory< Scalar > > &solutionHistory)
Take the specified timestep, dt, and return true if successful.
virtual OrderODE getOrderODE() const
virtual void computePredictor(const Teuchos::RCP< SolutionHistory< Scalar > > &solutionHistory)
Compute predictor given the supplied stepper.
virtual int stencilLength() const
Return the number of solution vectors in the time step stencil.
virtual Scalar getBeta(const Scalar) const
Return beta = d(x)/dx.
Teuchos::RCP< Teuchos::ParameterList > getDefaultParameters() const
virtual Teuchos::RCP< Tempus::StepperState< Scalar > > getDefaultStepperState()
Get a default (initial) StepperState.
void setPredictor(std::string predictorName)
Set the predictor.
virtual bool isMultiStepMethod() const
virtual void setObserver(Teuchos::RCP< StepperObserver< Scalar > > obs=Teuchos::null)
Set Observer.
virtual bool isOneStepMethod() const
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
Compute time step Jacobian solver.
Thyra Base interface for implicit time steppers.
virtual std::string description() const
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
Compute time step Jacobian.
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
Compute time step derivative w.r.t. model parameters.
StepperObserver class for Stepper class.
Teuchos::RCP< SolutionHistory< Scalar > > solutionHistory(Teuchos::RCP< Teuchos::ParameterList > pList=Teuchos::null)
Nonmember constructor.
virtual Scalar getAlpha(const Scalar dt) const
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_
Teuchos::RCP< Teuchos::ParameterList > getNonconstParameterList()
Stepper integrates first-order ODEs.
StepperBackwardEulerTimeDerivative(Scalar s, Teuchos::RCP< const Thyra::VectorBase< Scalar > > xOld)
Constructor.
This interface defines the time derivative connection between an implicit Stepper and WrapperModelEva...
virtual void setInitialConditions(const Teuchos::RCP< SolutionHistory< Scalar > > &solutionHistory)
Set the initial conditions and make them consistent.
virtual void describe(Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel) const
Teuchos::RCP< StepperBackwardEulerObserver< Scalar > > stepperBEObserver_
Teuchos::RCP< Teuchos::ParameterList > unsetParameterList()
void setParameterList(const Teuchos::RCP< Teuchos::ParameterList > &pl)
virtual void initialize(Scalar s, Teuchos::RCP< const Thyra::VectorBase< Scalar > > xOld)
Stepper interface to support full-space optimization.
virtual Scalar getOrderMin() const
Time-derivative interface for Backward Euler.
virtual bool isExplicit() const
virtual void initialize()
Initialize during construction and after changing input parameters.
virtual Scalar getOrder() const
virtual bool isExplicitImplicit() const
virtual bool isImplicit() const