org.opensourcephysics.numerics
Interface DDE

All Superinterfaces:
ODE

public interface DDE
extends ODE

DDE defines a system of delay differential equations

Author:
Francisco Esquembre, Maria Jose Cano

Method Summary
 double[] getDelays(double[] state)
          Returns the array of delays for a given state.
 double[] getInitialCondition(double time, double[] state)
          Returns the initial condition for an interval backwards in time longer than or equal to the maximum delay
 double[] getInitialConditionDiscontinuities()
          Returns an array with possible discontinuities of the initial condition.
 double getMaximumDelay()
          The largest possible delay.
 void getRate(double[] currentState, IntervalData[] intervals, double[] rate)
          Returns the rate for the given state.
 
Methods inherited from interface org.opensourcephysics.numerics.ODE
getRate, getState
 

Method Detail

getRate

void getRate(double[] currentState,
             IntervalData[] intervals,
             double[] rate)
Returns the rate for the given state. DDEs can retrieve the past state of any state variable at the ith-delay using intervals[i].interpolate(time,indexOfState); or parts of or even the whole state at once (more efficient if many past values are required) using intervals[i].interpolate(time,pastState); or intervals[i].interpolate(time,pastState, int beginIndex, int length); The time can be obtained from the last entry of currentState[] minus the required delay.

Parameters:
currentState - the state at current time
rate - a place holder for the rate
intervals - an array of IntervalData, one for each of the delays

getMaximumDelay

double getMaximumDelay()
The largest possible delay. This value must be constant unless you initialize() the solver. In case the delays array is not constant, the maximum delay should be large enough to cover all possible delays. A solver will use this value to keep the state memory for at least this length back in time.

Returns:

getDelays

double[] getDelays(double[] state)
Returns the array of delays for a given state. The number of delays, i.e. the length of this array must be constant, unless you initialize() the solver.

Returns:

getInitialCondition

double[] getInitialCondition(double time,
                             double[] state)
Returns the initial condition for an interval backwards in time longer than or equal to the maximum delay

Parameters:
time - the given time back in time
state - a place holder for the state
Returns:
the array if successful, null if the time is beyond the limits

getInitialConditionDiscontinuities

double[] getInitialConditionDiscontinuities()
Returns an array with possible discontinuities of the initial condition. (i.e. where the initial state is not C-k continuous)

Returns:
null or zero-length array if there are no such discontinuities