9 #ifndef Tempus_StepperDIRK_decl_hpp
10 #define Tempus_StepperDIRK_decl_hpp
12 #include "Tempus_config.hpp"
14 #include "Tempus_StepperImplicit.hpp"
16 #ifndef TEMPUS_HIDE_DEPRECATED_CODE
17 #include "Tempus_StepperRKObserverComposite.hpp"
152 template<
class Scalar>
160 #ifndef TEMPUS_HIDE_DEPRECATED_CODE
164 virtual Teuchos::RCP<StepperObserver<Scalar> >
getObserver()
const
189 const int numStages = this->
tableau_->numStages();
190 Teuchos::SerialDenseMatrix<int,Scalar> A = this->
tableau_->A();
192 for (
int i=0; i<numStages; ++i)
if (A(i,i) == 0.0) isExplicit =
true;
204 Teuchos::RCP<Teuchos::ParameterList> pl)
const;
215 const Teuchos::SerialDenseMatrix<int,Scalar> & A=this->
tableau_->A();
216 return Scalar(1.0)/(dt*A(0,0));
219 virtual Scalar
getBeta (
const Scalar )
const {
return Scalar(1.0); }
225 virtual void describe(Teuchos::FancyOStream & out,
226 const Teuchos::EVerbosityLevel verbLevel)
const;
229 virtual bool isValidSetup(Teuchos::FancyOStream & out)
const;
246 #ifndef TEMPUS_HIDE_DEPRECATED_CODE
248 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& wrapperModel,
250 const Teuchos::RCP<Thyra::NonlinearSolverBase<Scalar> >& solver,
252 std::string ICConsistency,
253 bool ICConsistencyCheck,
255 bool zeroInitialGuess);
258 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& wrapperModel,
259 const Teuchos::RCP<Thyra::NonlinearSolverBase<Scalar> >& solver,
261 std::string ICConsistency,
262 bool ICConsistencyCheck,
264 bool zeroInitialGuess,
269 std::vector<Teuchos::RCP<Thyra::VectorBase<Scalar> > >
stageXDot_;
270 Teuchos::RCP<Thyra::VectorBase<Scalar> >
xTilde_;
272 #ifndef TEMPUS_HIDE_DEPRECATED_CODE
278 Teuchos::RCP<Thyra::VectorBase<Scalar> >
ee_;
279 Teuchos::RCP<Thyra::VectorBase<Scalar> >
abs_u0;
280 Teuchos::RCP<Thyra::VectorBase<Scalar> >
abs_u;
281 Teuchos::RCP<Thyra::VectorBase<Scalar> >
sc;
299 template <
typename Scalar>
307 Scalar s, Teuchos::RCP<
const Thyra::VectorBase<Scalar> > xTilde)
315 Teuchos::RCP<
const Thyra::VectorBase<Scalar> > x,
316 Teuchos::RCP< Thyra::VectorBase<Scalar> > xDot,
317 Teuchos::RCP< Thyra::VectorBase<Scalar> > xDotDot = Teuchos::null)
319 xDotDot = Teuchos::null;
324 Teuchos::RCP<
const Thyra::VectorBase<Scalar> > xTilde)
329 Teuchos::RCP<const Thyra::VectorBase<Scalar> >
xTilde_;
336 #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 Teuchos::RCP< Tempus::StepperState< Scalar > > getDefaultStepperState()
Get a default (initial) StepperState.
Teuchos::RCP< RKButcherTableau< Scalar > > tableau_
Teuchos::RCP< Thyra::VectorBase< Scalar > > ee_
virtual void setup(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &wrapperModel, const Teuchos::RCP< StepperRKObserver< Scalar > > &obs, const Teuchos::RCP< Thyra::NonlinearSolverBase< Scalar > > &solver, bool useFSAL, std::string ICConsistency, bool ICConsistencyCheck, bool useEmbedded, bool zeroInitialGuess)
Setup for constructor.
virtual void setupTableau()=0
void getValidParametersBasicDIRK(Teuchos::RCP< Teuchos::ParameterList > pl) const
virtual bool getUseEmbedded() const
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.
virtual void setResetInitialGuess(bool reset_guess)
Set parameter so that the initial guess is reset at the beginning of each timestep.
virtual Teuchos::RCP< StepperObserver< Scalar > > getObserver() const
Get Observer.
Base class for Runge-Kutta methods, ExplicitRK, DIRK and IMEX.
virtual bool getUseEmbeddedDefault() const
virtual bool isValidSetup(Teuchos::FancyOStream &out) const
Diagonally Implicit Runge-Kutta (DIRK) time stepper.
virtual bool isExplicitImplicit() const
Thyra Base interface for implicit time steppers.
Application Action for StepperRKBase.
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 after construction and changing input parameters.
virtual bool isImplicit() const
Time-derivative interface for DIRK.
virtual void setupDefault()
Default setup for constructor.
StepperObserver class for Stepper class.
SolutionHistory is basically a container of SolutionStates. SolutionHistory maintains a collection of...
Teuchos::RCP< StepperRKObserverComposite< Scalar > > stepperObserver_
std::vector< Teuchos::RCP< Thyra::VectorBase< Scalar > > > & getStageXDot()
Stepper integrates first-order ODEs.
virtual bool isOneStepMethod() const
virtual std::string getDescription() const =0
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 void describe(Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel) const
StepperRKObserver class for StepperRK.
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)
virtual void setUseEmbedded(bool a)
Use embedded if avialable.
virtual bool getResetInitialGuess() const
virtual void takeStep(const Teuchos::RCP< SolutionHistory< Scalar > > &solutionHistory)
Take the specified timestep, dt, and return true if successful.
Teuchos::RCP< Thyra::VectorBase< Scalar > > & getXTilde()
StepperDIRKTimeDerivative(Scalar s, Teuchos::RCP< const Thyra::VectorBase< Scalar > > xTilde)
Constructor.