Interface StepInterpolator
- All Superinterfaces:
ODEStateInterpolator
,Serializable
The various ODE integrators provide objects implementing this interface to the step handlers. These objects are often custom objects tightly bound to the integrator internal algorithms. The handlers can use these objects to retrieve the state vector at intermediate times between the previous and the current grid points (this feature is often called dense output).
One important thing to note is that the step handlers may be so
tightly bound to the integrators that they often share some internal
state arrays. This imply that one should never use a direct
reference to a step interpolator outside of the step handler, either
for future use or for use in another thread. If such a need arise, the
step interpolator must be copied using the dedicated
copy()
method.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptioncopy()
Deprecated.Copy the instance.double
Deprecated.as of 1.0, replaced withODEStateInterpolator.getCurrentState()
/ODEState.getTime()
double[]
Deprecated.as of 1.0, replaced withODEStateInterpolator.getInterpolatedState(double)
.ODEStateAndDerivative.getPrimaryDerivative()
double[]
getInterpolatedSecondaryDerivatives
(int index) Deprecated.as of 1.0, replaced withODEStateInterpolator.getInterpolatedState(double)
.ODEStateAndDerivative.getSecondaryDerivative(int)
double[]
getInterpolatedSecondaryState
(int index) Deprecated.as of 1.0, replaced withODEStateInterpolator.getInterpolatedState(double)
.ODEState.getSecondaryState(int)
double[]
Deprecated.as of 1.0, replaced withODEStateInterpolator.getInterpolatedState(double)
.ODEState.getPrimaryState()
double
Deprecated.as of 1.0, replaced withODEStateInterpolator.getInterpolatedState(double)
/ODEState.getTime()
double
Deprecated.as of 1.0, replaced withODEStateInterpolator.getPreviousState()
/ODEState.getTime()
boolean
Deprecated.Check if the natural integration direction is forward.void
setInterpolatedTime
(double time) Deprecated.as of 1.0, replaced withODEStateInterpolator.getInterpolatedState(double)
Methods inherited from interface org.hipparchus.ode.sampling.ODEStateInterpolator
getCurrentState, getInterpolatedState, getPreviousState, isCurrentStateInterpolated, isPreviousStateInterpolated
-
Method Details
-
getPreviousTime
Deprecated.as of 1.0, replaced withODEStateInterpolator.getPreviousState()
/ODEState.getTime()
Get the previous grid point time.- Returns:
- previous grid point time
-
getCurrentTime
Deprecated.as of 1.0, replaced withODEStateInterpolator.getCurrentState()
/ODEState.getTime()
Get the current grid point time.- Returns:
- current grid point time
-
getInterpolatedTime
Deprecated.as of 1.0, replaced withODEStateInterpolator.getInterpolatedState(double)
/ODEState.getTime()
Get the time of the interpolated point. IfsetInterpolatedTime(double)
has not been called, it returns the current grid point time.- Returns:
- interpolation point time
-
setInterpolatedTime
Deprecated.as of 1.0, replaced withODEStateInterpolator.getInterpolatedState(double)
Set the time of the interpolated point.Setting the time outside of the current step is now allowed, but should be used with care since the accuracy of the interpolator will probably be very poor far from this step. This allowance has been added to simplify implementation of search algorithms near the step endpoints.
Setting the time changes the instance internal state. This includes the internal arrays returned in
getInterpolatedState()
,getInterpolatedDerivatives()
,getInterpolatedSecondaryState(int)
andgetInterpolatedSecondaryDerivatives(int)
. So if their content must be preserved across several calls, user must copy them.- Parameters:
time
- time of the interpolated point- See Also:
-
getInterpolatedState
Deprecated.as of 1.0, replaced withODEStateInterpolator.getInterpolatedState(double)
.ODEState.getPrimaryState()
Get the state vector of the interpolated point.The returned vector is a reference to a reused array, so it should not be modified and it should be copied if it needs to be preserved across several calls to the associated
setInterpolatedTime(double)
method.- Returns:
- state vector at time
getInterpolatedTime()
- Throws:
MathIllegalStateException
- if the number of functions evaluations is exceeded- See Also:
-
getInterpolatedDerivatives
Deprecated.as of 1.0, replaced withODEStateInterpolator.getInterpolatedState(double)
.ODEStateAndDerivative.getPrimaryDerivative()
Get the derivatives of the state vector of the interpolated point.The returned vector is a reference to a reused array, so it should not be modified and it should be copied if it needs to be preserved across several calls to the associated
setInterpolatedTime(double)
method.- Returns:
- derivatives of the state vector at time
getInterpolatedTime()
- Throws:
MathIllegalStateException
- if the number of functions evaluations is exceeded- See Also:
-
getInterpolatedSecondaryState
Deprecated.as of 1.0, replaced withODEStateInterpolator.getInterpolatedState(double)
.ODEState.getSecondaryState(int)
Get the interpolated secondary state corresponding to the secondary equations.The returned vector is a reference to a reused array, so it should not be modified and it should be copied if it needs to be preserved across several calls to the associated
setInterpolatedTime(double)
method.- Parameters:
index
- index of the secondary set, as returned byExpandableODE.addSecondaryEquations(secondary)
- Returns:
- interpolated secondary state at the current interpolation date
- Throws:
MathIllegalStateException
- if the number of functions evaluations is exceeded- See Also:
-
getInterpolatedSecondaryDerivatives
@Deprecated double[] getInterpolatedSecondaryDerivatives(int index) throws MathIllegalStateException Deprecated.as of 1.0, replaced withODEStateInterpolator.getInterpolatedState(double)
.ODEStateAndDerivative.getSecondaryDerivative(int)
Get the interpolated secondary derivatives corresponding to the secondary equations.The returned vector is a reference to a reused array, so it should not be modified and it should be copied if it needs to be preserved across several calls.
- Parameters:
index
- index of the secondary set, as returned byExpandableODE.addSecondaryEquations(secondary)
- Returns:
- interpolated secondary derivatives at the current interpolation date
- Throws:
MathIllegalStateException
- if the number of functions evaluations is exceeded- See Also:
-
isForward
boolean isForward()Deprecated.Check if the natural integration direction is forward.This method provides the integration direction as specified by the integrator itself, it avoid some nasty problems in degenerated cases like null steps due to cancellation at step initialization, step control or discrete events triggering.
- Specified by:
isForward
in interfaceODEStateInterpolator
- Returns:
- true if the integration variable (time) increases during integration
-
copy
Deprecated.Copy the instance.The copied instance is guaranteed to be independent from the original one. Both can be used with different settings for interpolated time without any side effect.
- Returns:
- a deep copy of the instance, which can be used independently.
- Throws:
MathIllegalStateException
- if the number of functions evaluations is exceeded during step finalization- See Also:
-
ODEStateInterpolator