9 #ifndef Tempus_StepperTrapezoidal_decl_hpp
10 #define Tempus_StepperTrapezoidal_decl_hpp
12 #include "Tempus_StepperImplicit.hpp"
40 template<
class Scalar>
54 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& appModel,
56 const Teuchos::RCP<Thyra::NonlinearSolverBase<Scalar> >& solver,
58 std::string ICConsistency,
59 bool ICConsistencyCheck,
60 bool zeroInitialGuess);
67 virtual Teuchos::RCP<StepperObserver<Scalar> >
getObserver()
const
97 virtual Scalar
getAlpha(
const Scalar dt)
const {
return Scalar(2.0)/dt; }
99 virtual Scalar
getBeta (
const Scalar )
const {
return Scalar(1.0); }
105 virtual void describe(Teuchos::FancyOStream & out,
106 const Teuchos::EVerbosityLevel verbLevel)
const;
126 template <
typename Scalar>
134 Teuchos::RCP<
const Thyra::VectorBase<Scalar> > xOld,
135 Teuchos::RCP<
const Thyra::VectorBase<Scalar> > xDotOld)
143 Teuchos::RCP<
const Thyra::VectorBase<Scalar> > x,
144 Teuchos::RCP< Thyra::VectorBase<Scalar> > xDot,
145 Teuchos::RCP< Thyra::VectorBase<Scalar> > xDotDot = Teuchos::null)
147 xDotDot = Teuchos::null;
149 Thyra::V_StVpStV(xDot.ptr(),
s_,*x,-
s_,*
xOld_);
150 Thyra::V_VpStV (xDot.ptr(),*xDot,Scalar(-1.0),*
xDotOld_);
154 Teuchos::RCP<
const Thyra::VectorBase<Scalar> > xOld,
155 Teuchos::RCP<
const Thyra::VectorBase<Scalar> > xDotOld)
161 Teuchos::RCP<const Thyra::VectorBase<Scalar> >
xOld_;
162 Teuchos::RCP<const Thyra::VectorBase<Scalar> >
xDotOld_;
168 #endif // Tempus_StepperTrapezoidal_decl_hpp
virtual bool isImplicit() const
virtual Teuchos::RCP< Tempus::StepperState< Scalar > > getDefaultStepperState()
Get a default (initial) StepperState.
Trapezoidal method time stepper.
virtual bool isMultiStepMethod() const
StepperTrapezoidalTimeDerivative(Scalar s, Teuchos::RCP< const Thyra::VectorBase< Scalar > > xOld, Teuchos::RCP< const Thyra::VectorBase< Scalar > > xDotOld)
Constructor.
virtual void initialize(Scalar s, Teuchos::RCP< const Thyra::VectorBase< Scalar > > xOld, Teuchos::RCP< const Thyra::VectorBase< Scalar > > xDotOld)
virtual bool isOneStepMethod() const
virtual Scalar getOrderMax() const
virtual bool getUseFSALDefault() const
virtual bool isExplicit() const
Teuchos::RCP< StepperTrapezoidalObserver< Scalar > > stepperTrapObserver_
virtual Teuchos::RCP< StepperObserver< Scalar > > getObserver() const
Get Observer.
Teuchos::RCP< const Thyra::VectorBase< Scalar > > xDotOld_
StepperTrapezoidal()
Default constructor.
virtual void setInitialConditions(const Teuchos::RCP< SolutionHistory< Scalar > > &solutionHistory)
Set the initial conditions and make them consistent.
Thyra Base interface for implicit time steppers.
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.
Teuchos::RCP< const Thyra::VectorBase< Scalar > > xOld_
virtual Scalar getOrderMin() const
virtual void initialize()
Initialize during construction and after changing input parameters.
StepperObserver class for Stepper class.
Teuchos::RCP< SolutionHistory< Scalar > > solutionHistory(Teuchos::RCP< Teuchos::ParameterList > pList=Teuchos::null)
Nonmember constructor.
virtual std::string getICConsistencyDefault() const
Time-derivative interface for Trapezoidal method.
virtual Scalar getAlpha(const Scalar dt) const
Return alpha = d(xDot)/dx.
SolutionHistory is basically a container of SolutionStates. SolutionHistory maintains a collection of...
virtual Scalar getBeta(const Scalar) const
Return beta = d(x)/dx.
Stepper integrates first-order ODEs.
virtual Scalar getOrder() const
virtual OrderODE getOrderODE() const
virtual bool isExplicitImplicit() const
This interface defines the time derivative connection between an implicit Stepper and WrapperModelEva...
virtual ~StepperTrapezoidalTimeDerivative()
Destructor.
virtual void describe(Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel) const
virtual void setObserver(Teuchos::RCP< StepperObserver< Scalar > > obs=Teuchos::null)
Set Observer.
virtual void takeStep(const Teuchos::RCP< SolutionHistory< Scalar > > &solutionHistory)
Take the specified timestep, dt, and return true if successful.
Teuchos::RCP< const Teuchos::ParameterList > getValidParameters() const