9 #ifndef Tempus_StepperDIRK_decl_hpp
10 #define Tempus_StepperDIRK_decl_hpp
12 #include "Tempus_config.hpp"
14 #include "Tempus_StepperImplicit.hpp"
86 template<
class Scalar>
102 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& appModel,
103 Teuchos::RCP<Teuchos::ParameterList> pList);
107 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& appModel,
108 std::string stepperType =
"SDIRK 2 Stage 2nd order");
112 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& appModel,
113 std::string stepperType, Teuchos::RCP<Teuchos::ParameterList> pList);
120 virtual void setTableau(std::string stepperType);
123 Teuchos::RCP<Teuchos::ParameterList> pList = Teuchos::null);
150 for (
int i=0; i<numStages; ++i)
if (A(i,i) == 0.0) isExplicit =
true;
166 return Scalar(1.0)/(dt*A(0,0));
169 virtual Scalar
getBeta (
const Scalar )
const {
return Scalar(1.0); }
183 virtual void describe(Teuchos::FancyOStream & out,
184 const Teuchos::EVerbosityLevel verbLevel)
const;
191 std::vector<Teuchos::RCP<Thyra::VectorBase<Scalar> > >
stageXDot_;
192 Teuchos::RCP<Thyra::VectorBase<Scalar> >
stageX_;
193 Teuchos::RCP<Thyra::VectorBase<Scalar> >
xTilde_;
197 Teuchos::RCP<Thyra::VectorBase<Scalar> >
ee_;
200 Teuchos::RCP<Thyra::VectorBase<Scalar> >
abs_u0;
201 Teuchos::RCP<Thyra::VectorBase<Scalar> >
abs_u;
202 Teuchos::RCP<Thyra::VectorBase<Scalar> >
sc;
219 template <
typename Scalar>
227 Scalar s, Teuchos::RCP<
const Thyra::VectorBase<Scalar> > xTilde)
235 Teuchos::RCP<
const Thyra::VectorBase<Scalar> > x,
236 Teuchos::RCP< Thyra::VectorBase<Scalar> > xDot,
237 Teuchos::RCP< Thyra::VectorBase<Scalar> > xDotDot = Teuchos::null)
239 xDotDot = Teuchos::null;
244 Teuchos::RCP<
const Thyra::VectorBase<Scalar> > xTilde)
249 Teuchos::RCP<const Thyra::VectorBase<Scalar> >
xTilde_;
256 #endif // Tempus_StepperDIRK_decl_hpp
virtual Scalar getBeta(const Scalar) const
Return beta = d(x)/dx.
Teuchos::RCP< Thyra::VectorBase< Scalar > > xTilde_
virtual bool isMultiStepMethod() const
Teuchos::RCP< const Thyra::VectorBase< Scalar > > xTilde_
virtual void setTableau(std::string stepperType)
virtual Teuchos::RCP< Tempus::StepperState< Scalar > > getDefaultStepperState()
Get a default (initial) StepperState.
Teuchos::RCP< Teuchos::ParameterList > unsetParameterList()
Teuchos::RCP< Thyra::VectorBase< Scalar > > ee_
StepperDIRK()
Default constructor.
virtual ~StepperDIRKTimeDerivative()
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.
Teuchos::RCP< Thyra::VectorBase< Scalar > > stageX_
Teuchos::RCP< const RKButcherTableau< Scalar > > DIRK_ButcherTableau_
Diagonally Implicit Runge-Kutta (DIRK) time stepper.
virtual bool isExplicitImplicit() const
virtual Scalar getOrderMin() const
Thyra Base interface for implicit time steppers.
virtual bool isExplicit() const
Teuchos::RCP< Thyra::VectorBase< Scalar > > abs_u
virtual void setInitialConditions(const Teuchos::RCP< SolutionHistory< Scalar > > &solutionHistory)
Set the initial conditions and make them consistent.
Teuchos::RCP< Thyra::VectorBase< Scalar > > abs_u0
virtual void initialize()
Initialize during construction and after changing input parameters.
virtual bool isImplicit() const
Time-derivative interface for DIRK.
virtual std::string description() const
StepperObserver class for Stepper class.
Teuchos::RCP< SolutionHistory< Scalar > > solutionHistory(Teuchos::RCP< Teuchos::ParameterList > pList=Teuchos::null)
Nonmember constructor.
Teuchos::RCP< Teuchos::ParameterList > getNonconstParameterList()
SolutionHistory is basically a container of SolutionStates. SolutionHistory maintains a collection of...
void setParameterList(const Teuchos::RCP< Teuchos::ParameterList > &pl)
virtual Scalar getOrderMax() const
Teuchos::RCP< StepperDIRKObserver< Scalar > > stepperDIRKObserver_
Stepper integrates first-order ODEs.
virtual bool isOneStepMethod() const
Teuchos::RCP< const Teuchos::ParameterList > getValidParameters() const
virtual void setObserver(Teuchos::RCP< StepperObserver< Scalar > > obs=Teuchos::null)
Set Observer.
virtual Scalar getAlpha(const Scalar dt) const
Return alpha = d(xDot)/dx.
virtual OrderODE getOrderODE() const
This interface defines the time derivative connection between an implicit Stepper and WrapperModelEva...
virtual Scalar getOrder() const
virtual void describe(Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel) const
Teuchos::RCP< Thyra::VectorBase< Scalar > > sc
std::vector< Teuchos::RCP< Thyra::VectorBase< Scalar > > > stageXDot_
virtual void initialize(Scalar s, Teuchos::RCP< const Thyra::VectorBase< Scalar > > xTilde)
Teuchos::RCP< Teuchos::ParameterList > getDefaultParameters() const
virtual void takeStep(const Teuchos::RCP< SolutionHistory< Scalar > > &solutionHistory)
Take the specified timestep, dt, and return true if successful.
StepperDIRKTimeDerivative(Scalar s, Teuchos::RCP< const Thyra::VectorBase< Scalar > > xTilde)
Constructor.