30 #ifndef RYTHMOS_STEP_CONTROL_STRATEGY_BASE_HPP
31 #define RYTHMOS_STEP_CONTROL_STRATEGY_BASE_HPP
34 #include "Rythmos_StepperBase.hpp"
46 enum AttemptedStepStatusFlag { PREDICT_AGAIN, CONTINUE_ANYWAY, REP_ERR_FAIL, REP_CONV_FAIL };
49 enum StepControlStrategyState { UNINITIALIZED, BEFORE_FIRST_STEP, MID_STEP, AFTER_CORRECTION, READY_FOR_NEXT_STEP, BEFORE_FIRST_STAGE, MID_STAGE };
58 const char* toString(
const StepControlStrategyState stepControlStrategyState )
60 switch(stepControlStrategyState) {
62 return "UNINITIALIZED";
63 case BEFORE_FIRST_STEP:
64 return "BEFORE_FIRST_STEP";
67 case AFTER_CORRECTION:
68 return "AFTER_CORRECTION";
69 case READY_FOR_NEXT_STEP:
70 return "READY_FOR_NEXT_STEP";
71 case BEFORE_FIRST_STAGE:
72 return "BEFORE_FIRST_STAGE";
75 #ifdef HAVE_RYTHMOS_DEBUG
77 TEUCHOS_TEST_FOR_EXCEPT(
"Invalid enum value!");
105 template<
class Scalar>
107 :
virtual public Teuchos::Describable
108 ,
virtual public Teuchos::ParameterListAcceptor
109 ,
virtual public Teuchos::VerboseObject<StepControlStrategyBase<Scalar> >
119 ,
const Scalar& stepSize
120 ,
const StepSizeType& stepSizeType
127 , StepSizeType* stepSizeType
134 ,
const RCP<
const Thyra::VectorBase<Scalar> >& soln
135 ,
const RCP<
const Thyra::VectorBase<Scalar> >& ee
173 template<
class Scalar>
180 template<
class Scalar>
181 RCP<StepControlStrategyBase<Scalar> >
184 return Teuchos::null;
191 #endif // RYTHMOS_STEP_CONTROL_STRATEGY_BASE_HPP
virtual AttemptedStepStatusFlag rejectStep(const StepperBase< Scalar > &stepper)=0
Base class for defining stepper functionality.
virtual void setCorrection(const StepperBase< Scalar > &stepper, const RCP< const Thyra::VectorBase< Scalar > > &soln, const RCP< const Thyra::VectorBase< Scalar > > &ee, int solveStatus)=0
virtual void setRequestedStepSize(const StepperBase< Scalar > &stepper, const Scalar &stepSize, const StepSizeType &stepSizeType)=0
virtual void nextStepSize(const StepperBase< Scalar > &stepper, Scalar *stepSize, StepSizeType *stepSizeType, int *order)=0
The member functions in the StepControlStrategyBase move you between these states in the following fa...
virtual void setStepControlData(const StepperBase< Scalar > &stepper)=0
virtual RCP< StepControlStrategyBase< Scalar > > cloneStepControlStrategyAlgorithm() const
virtual StepControlStrategyState getCurrentState()=0
virtual bool supportsCloning() const
virtual void completeStep(const StepperBase< Scalar > &stepper)=0
virtual void initialize(const StepperBase< Scalar > &stepper)=0
virtual int getMaxOrder() const =0
virtual bool acceptStep(const StepperBase< Scalar > &stepper, Scalar *LETValue)=0