ODEStateInterpolator
@Deprecated public interface StepInterpolator extends ODEStateInterpolator
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.
ODEIntegrator
,
StepHandler
getCurrentState, getInterpolatedState, getPreviousState, isCurrentStateInterpolated, isPreviousStateInterpolated
@Deprecated double getPreviousTime()
ODEStateInterpolator.getPreviousState()
/ODEState.getTime()
@Deprecated double getCurrentTime()
ODEStateInterpolator.getCurrentState()
/ODEState.getTime()
@Deprecated double getInterpolatedTime()
ODEStateInterpolator.getInterpolatedState(double)
/ODEState.getTime()
setInterpolatedTime(double)
has not been called, it returns
the current grid point time.@Deprecated void setInterpolatedTime(double time)
ODEStateInterpolator.getInterpolatedState(double)
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)
and getInterpolatedSecondaryDerivatives(int)
. So if their content must be preserved
across several calls, user must copy them.
time
- time of the interpolated pointgetInterpolatedState()
,
getInterpolatedDerivatives()
,
getInterpolatedSecondaryState(int)
,
getInterpolatedSecondaryDerivatives(int)
@Deprecated double[] getInterpolatedState() throws MathIllegalStateException
ODEStateInterpolator.getInterpolatedState(double)
.ODEState.getPrimaryState()
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.
getInterpolatedTime()
MathIllegalStateException
- if the number of functions evaluations is exceededgetInterpolatedDerivatives()
,
getInterpolatedSecondaryState(int)
,
getInterpolatedSecondaryDerivatives(int)
,
setInterpolatedTime(double)
@Deprecated double[] getInterpolatedDerivatives() throws MathIllegalStateException
ODEStateInterpolator.getInterpolatedState(double)
.ODEStateAndDerivative.getPrimaryDerivative()
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.
getInterpolatedTime()
MathIllegalStateException
- if the number of functions evaluations is exceededgetInterpolatedState()
,
getInterpolatedSecondaryState(int)
,
getInterpolatedSecondaryDerivatives(int)
,
setInterpolatedTime(double)
@Deprecated double[] getInterpolatedSecondaryState(int index) throws MathIllegalStateException
ODEStateInterpolator.getInterpolatedState(double)
.ODEState.getSecondaryState(int)
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.
index
- index of the secondary set, as returned by ExpandableODE.addSecondaryEquations(secondary)
MathIllegalStateException
- if the number of functions evaluations is exceededgetInterpolatedState()
,
getInterpolatedDerivatives()
,
getInterpolatedSecondaryDerivatives(int)
,
setInterpolatedTime(double)
@Deprecated double[] getInterpolatedSecondaryDerivatives(int index) throws MathIllegalStateException
ODEStateInterpolator.getInterpolatedState(double)
.ODEStateAndDerivative.getSecondaryDerivative(int)
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.
index
- index of the secondary set, as returned by ExpandableODE.addSecondaryEquations(secondary)
MathIllegalStateException
- if the number of functions evaluations is exceededgetInterpolatedState()
,
getInterpolatedDerivatives()
,
getInterpolatedSecondaryState(int)
,
setInterpolatedTime(double)
boolean isForward()
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.
isForward
in interface ODEStateInterpolator
StepInterpolator copy() throws MathIllegalStateException
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.
MathIllegalStateException
- if the number of functions evaluations is exceeded
during step finalizationsetInterpolatedTime(double)
Copyright © 2016–2020 Hipparchus.org. All rights reserved.