Rythmos - Transient Integration for Differential Equations  Version of the Day
 All Classes Functions Variables Typedefs Pages
Public Member Functions | List of all members
Rythmos::IntegrationControlStrategyBase< Scalar > Class Template Referenceabstract

Base class for strategy objects that control integration by selecting step sizes for a stepper. More...

#include <Rythmos_IntegrationControlStrategyBase.hpp>

Inheritance diagram for Rythmos::IntegrationControlStrategyBase< Scalar >:
Inheritance graph
[legend]

Public Member Functions

virtual bool handlesFailedTimeSteps () const
 Return if this object can handle and repond to failed time steps. More...
 
virtual RCP
< IntegrationControlStrategyBase
< Scalar > > 
cloneIntegrationControlStrategy () const =0
 Clone this integration control object if supported . More...
 
virtual void resetIntegrationControlStrategy (const TimeRange< Scalar > &integrationTimeDomain)=0
 Reset the control algorithm to the beginning to start a new integration. More...
 
virtual StepControlInfo< Scalar > getNextStepControlInfo (const StepperBase< Scalar > &stepper, const StepControlInfo< Scalar > &stepCtrlInfoLast, const int timeStepIter)=0
 Select the next time step control info. More...
 
virtual bool resetForFailedTimeStep (const StepperBase< Scalar > &, const StepControlInfo< Scalar > &, const int, const StepControlInfo< Scalar > &)
 Inform of a failed time step. More...
 

Detailed Description

template<class Scalar>
class Rythmos::IntegrationControlStrategyBase< Scalar >

Base class for strategy objects that control integration by selecting step sizes for a stepper.

ToDo: Finish Implementation!

Definition at line 25 of file Rythmos_IntegrationControlStrategyBase.hpp.

Member Function Documentation

template<class Scalar >
virtual bool Rythmos::IntegrationControlStrategyBase< Scalar >::handlesFailedTimeSteps ( ) const
inlinevirtual

Return if this object can handle and repond to failed time steps.

Default implementation returns false.

Reimplemented in Rythmos::RampingIntegrationControlStrategy< Scalar >.

Definition at line 36 of file Rythmos_IntegrationControlStrategyBase.hpp.

template<class Scalar >
virtual RCP<IntegrationControlStrategyBase<Scalar> > Rythmos::IntegrationControlStrategyBase< Scalar >::cloneIntegrationControlStrategy ( ) const
pure virtual

Clone this integration control object if supported .

Here, the cloned object just has to have the control information copied, not the complete state of the object mid way through an integration.

Implemented in Rythmos::RampingIntegrationControlStrategy< Scalar >, and Rythmos::SimpleIntegrationControlStrategy< Scalar >.

template<class Scalar >
virtual void Rythmos::IntegrationControlStrategyBase< Scalar >::resetIntegrationControlStrategy ( const TimeRange< Scalar > &  integrationTimeDomain)
pure virtual

Reset the control algorithm to the beginning to start a new integration.

Parameters
integrationTimeDomain[in] The time domain over which the integration will be defined.

Preconditions:

  • integrationTimeDomain.length() > 0.0

Implemented in Rythmos::RampingIntegrationControlStrategy< Scalar >, and Rythmos::SimpleIntegrationControlStrategy< Scalar >.

template<class Scalar >
virtual StepControlInfo<Scalar> Rythmos::IntegrationControlStrategyBase< Scalar >::getNextStepControlInfo ( const StepperBase< Scalar > &  stepper,
const StepControlInfo< Scalar > &  stepCtrlInfoLast,
const int  timeStepIter 
)
pure virtual

Select the next time step control info.

Parameters
stepper[in] The stepper object that is being stepped forward in time to integrate the transient ODE/DAE equations. On the very first call, this stepper should just have the initial condition.
stepCtrlInfoLast[in] The actual time step that was taken on the last time step.
timeStepIter[in] The (zero-based) time step iteration counter. In the first call to this function, this should be passed as timeStepIter==0 and it should be incremented on each call only once. While the concrete implementation if *this could keep track of the this counter, putting it in the argument list helps to simplify logic and helps to validate correct usage.
Returns
Returns the control information about the next step, including if returnVal.stepSize is limited by a breakpoint and if that breakpoint requires a restart of the stepper. If no more steps are to be taken then a step size of returnVal.stepSize < 0.0 will be returned and the time integrator client should halt the integration immediately!

Warning! This function is NOT stateless. It should be called once and only once per time step iteration.

NOTE: The function resetIntegrationControlStrategy() must be called prior to even the first call to function.

Implemented in Rythmos::RampingIntegrationControlStrategy< Scalar >, and Rythmos::SimpleIntegrationControlStrategy< Scalar >.

template<class Scalar >
virtual bool Rythmos::IntegrationControlStrategyBase< Scalar >::resetForFailedTimeStep ( const StepperBase< Scalar > &  ,
const StepControlInfo< Scalar > &  ,
const int  ,
const StepControlInfo< Scalar > &   
)
inlinevirtual

Inform of a failed time step.

Parameters
stepper[in] The stepper object after the failed time step.
stepCtrlInfoLast[in] Same as passed into last call to getNextStepControlInfo().
timeStepIter[in] Same as passed into last call to getNextStepControlInfo().
stepControlInfo[in] Value returned from last call to getNextStepControlInfo().
Returns
true if a new timestep can be suggested, false if not.

this->handlesFailedTimeSteps()==true

Default implementation is to ignore this.

Reimplemented in Rythmos::RampingIntegrationControlStrategy< Scalar >.

Definition at line 115 of file Rythmos_IntegrationControlStrategyBase.hpp.


The documentation for this class was generated from the following file: