29 #ifndef Rythmos_ExplicitRK_STEPPER_DECL_H
30 #define Rythmos_ExplicitRK_STEPPER_DECL_H
32 #include "Rythmos_RKButcherTableauAcceptingStepperBase.hpp"
33 #include "Rythmos_RKButcherTableauBase.hpp"
34 #include "Rythmos_Types.hpp"
35 #include "Thyra_ModelEvaluator.hpp"
37 #include "Rythmos_StepControlStrategyAcceptingStepperBase.hpp"
38 #include "Rythmos_StepControlStrategyBase.hpp"
43 template<
class Scalar>
48 typedef Teuchos::ScalarTraits<Scalar> ST;
49 typedef typename Teuchos::ScalarTraits<Scalar>::magnitudeType ScalarMag;
77 Teuchos::RCP<const Thyra::VectorSpaceBase<Scalar> >
get_x_space()
const;
80 void setModel(
const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& model);
83 void setNonconstModel(
const Teuchos::RCP<Thyra::ModelEvaluator<Scalar> >& model);
86 Teuchos::RCP<const Thyra::ModelEvaluator<Scalar> >
getModel()
const;
96 const Thyra::ModelEvaluatorBase::InArgs<Scalar> &initialCondition
103 Scalar
takeStep(Scalar dt, StepSizeType flag);
110 Teuchos::FancyOStream &out,
111 const Teuchos::EVerbosityLevel verbLevel
117 const Array<Scalar>& time_vec
118 ,
const Array<Teuchos::RCP<
const Thyra::VectorBase<Scalar> > >& x_vec
119 ,
const Array<Teuchos::RCP<
const Thyra::VectorBase<Scalar> > >& xdot_vec
124 const Array<Scalar>& time_vec
125 ,Array<RCP<
const VectorBase<Scalar> > >* x_vec
126 ,Array<RCP<
const VectorBase<Scalar> > >* xdot_vec
127 ,Array<ScalarMag>* accuracy_vec)
const;
133 void getNodes(Array<Scalar>* time_vec)
const;
143 void setParameterList(Teuchos::RCP<Teuchos::ParameterList>
const& paramList);
164 RCP<StepControlStrategyBase<Scalar> >
168 RCP<const StepControlStrategyBase<Scalar> >
175 Teuchos::RCP<const Thyra::ModelEvaluator<Scalar> > model_;
176 Teuchos::RCP<Thyra::VectorBase<Scalar> > solution_vector_;
177 Teuchos::RCP<Thyra::VectorBase<Scalar> > solution_vector_old_;
178 Array<Teuchos::RCP<Thyra::VectorBase<Scalar> > > k_vector_;
179 Teuchos::RCP<Thyra::VectorBase<Scalar> > ktemp_vector_;
180 Teuchos::RCP<Thyra::VectorBase<Scalar> > solution_hat_vector_;
182 Thyra::ModelEvaluatorBase::InArgs<Scalar> basePoint_;
184 RCP<const RKButcherTableauBase<Scalar> > erkButcherTableau_;
192 Teuchos::RCP<Teuchos::ParameterList> parameterList_;
193 RCP<Thyra::VectorBase<Scalar> > ee_;
194 EStepLETStatus stepLETStatus_;
199 bool haveInitialCondition_;
202 void defaultInitializeAll_();
206 int rkNewtonConvergenceStatus_;
207 RCP<Rythmos::StepControlStrategyBase<Scalar> > stepControl_;
208 bool isVariableStep_ =
false;
210 Scalar takeVariableStep_(Scalar dt, StepSizeType flag);
212 Scalar takeFixedStep_(Scalar dt, StepSizeType flag);
217 template<
class Scalar>
218 RCP<ExplicitRKStepper<Scalar> > explicitRKStepper();
220 template<
class Scalar>
221 RCP<ExplicitRKStepper<Scalar> > explicitRKStepper(
222 const Teuchos::RCP<Thyra::ModelEvaluator<Scalar> >& model
225 template<
class Scalar>
226 RCP<ExplicitRKStepper<Scalar> > explicitRKStepper(
227 const Teuchos::RCP<Thyra::ModelEvaluator<Scalar> >& model,
228 const RCP<
const RKButcherTableauBase<Scalar> >& rkbt
233 #endif //Rythmos_ExplicitRK_STEPPER_DECL_H
Teuchos::RCP< Teuchos::ParameterList > unsetParameterList()
Mix-in interface for stepper objects that accept a step control strategy object to be used for evalua...
Scalar takeStep(Scalar dt, StepSizeType flag)
void setStepControlStrategy(const RCP< StepControlStrategyBase< Scalar > > &stepControlStrategy)
Teuchos::RCP< const Thyra::VectorSpaceBase< Scalar > > get_x_space() const
Teuchos::RCP< Teuchos::ParameterList > getNonconstParameterList()
RCP< const Teuchos::ParameterList > getValidParameters() const
The member functions in the StepControlStrategyBase move you between these states in the following fa...
void getNodes(Array< Scalar > *time_vec) const
Get interpolation nodes.
void setParameterList(Teuchos::RCP< Teuchos::ParameterList > const ¶mList)
Redefined from Teuchos::ParameterListAcceptor.
RCP< const StepControlStrategyBase< Scalar > > getStepControlStrategy() const
const StepStatus< Scalar > getStepStatus() const
void describe(Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel) const
int getOrder() const
Get order of interpolation.
void setRKButcherTableau(const RCP< const RKButcherTableauBase< Scalar > > &rkbt)
Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > getModel() const
void setModel(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &model)
void getPoints(const Array< Scalar > &time_vec, Array< RCP< const VectorBase< Scalar > > > *x_vec, Array< RCP< const VectorBase< Scalar > > > *xdot_vec, Array< ScalarMag > *accuracy_vec) const
Get values from buffer.
void removeNodes(Array< Scalar > &time_vec)
Remove interpolation nodes.
Thyra::ModelEvaluatorBase::InArgs< Scalar > getInitialCondition() const
Mix-in interface stepper objects that accept an RK Butcher Tableau.
RCP< StepperBase< Scalar > > cloneStepperAlgorithm() const
RCP< const RKButcherTableauBase< Scalar > > getRKButcherTableau() const
RCP< StepControlStrategyBase< Scalar > > getNonconstStepControlStrategy()
RCP< Thyra::ModelEvaluator< Scalar > > getNonconstModel()
bool supportsCloning() const
void setNonconstModel(const Teuchos::RCP< Thyra::ModelEvaluator< Scalar > > &model)
TimeRange< Scalar > getTimeRange() const
void addPoints(const Array< Scalar > &time_vec, const Array< Teuchos::RCP< const Thyra::VectorBase< Scalar > > > &x_vec, const Array< Teuchos::RCP< const Thyra::VectorBase< Scalar > > > &xdot_vec)
void setInitialCondition(const Thyra::ModelEvaluatorBase::InArgs< Scalar > &initialCondition)