Class AdamsStateInterpolator
java.lang.Object
org.hipparchus.ode.sampling.AbstractODEStateInterpolator
org.hipparchus.ode.nonstiff.interpolators.AdamsStateInterpolator
- All Implemented Interfaces:
Serializable
,ODEStateInterpolator
This class implements an interpolator for integrators using Nordsieck representation.
This interpolator computes dense output around the current point. The interpolation equation is based on Taylor series formulas.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionAdamsStateInterpolator
(double stepSize, ODEStateAndDerivative reference, double[] scaled, Array2DRowRealMatrix nordsieck, boolean isForward, ODEStateAndDerivative globalPreviousState, ODEStateAndDerivative globalCurrentState, EquationsMapper equationsMapper) Simple constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected ODEStateAndDerivative
computeInterpolatedStateAndDerivatives
(EquationsMapper equationsMapper, double time, double theta, double thetaH, double oneMinusThetaH) Compute the state and derivatives at the interpolated time.protected AdamsStateInterpolator
create
(boolean newForward, ODEStateAndDerivative newGlobalPreviousState, ODEStateAndDerivative newGlobalCurrentState, ODEStateAndDerivative newSoftPreviousState, ODEStateAndDerivative newSoftCurrentState, EquationsMapper newMapper) Create a new instance.Get the Nordsieck vector.double[]
Get the first scaled derivative.static ODEStateAndDerivative
taylor
(EquationsMapper equationsMapper, ODEStateAndDerivative reference, double time, double stepSize, double[] scaled, Array2DRowRealMatrix nordsieck) Estimate state by applying Taylor formula.Methods inherited from class org.hipparchus.ode.sampling.AbstractODEStateInterpolator
getCurrentState, getGlobalCurrentState, getGlobalPreviousState, getInterpolatedState, getMapper, getPreviousState, isCurrentStateInterpolated, isForward, isPreviousStateInterpolated, restrictStep
-
Constructor Details
-
AdamsStateInterpolator
public AdamsStateInterpolator(double stepSize, ODEStateAndDerivative reference, double[] scaled, Array2DRowRealMatrix nordsieck, boolean isForward, ODEStateAndDerivative globalPreviousState, ODEStateAndDerivative globalCurrentState, EquationsMapper equationsMapper) Simple constructor.- Parameters:
stepSize
- step size used in the scaled and Nordsieck arraysreference
- reference state from which Taylor expansion are estimatedscaled
- first scaled derivativenordsieck
- Nordsieck vectorisForward
- integration direction indicatorglobalPreviousState
- start of the global stepglobalCurrentState
- end of the global stepequationsMapper
- mapper for ODE equations primary and secondary components
-
-
Method Details
-
create
protected AdamsStateInterpolator create(boolean newForward, ODEStateAndDerivative newGlobalPreviousState, ODEStateAndDerivative newGlobalCurrentState, ODEStateAndDerivative newSoftPreviousState, ODEStateAndDerivative newSoftCurrentState, EquationsMapper newMapper) Create a new instance.- Specified by:
create
in classAbstractODEStateInterpolator
- Parameters:
newForward
- integration direction indicatornewGlobalPreviousState
- start of the global stepnewGlobalCurrentState
- end of the global stepnewSoftPreviousState
- start of the restricted stepnewSoftCurrentState
- end of the restricted stepnewMapper
- equations mapper for the all equations- Returns:
- a new instance
-
getScaled
public double[] getScaled()Get the first scaled derivative.- Returns:
- first scaled derivative
-
getNordsieck
Get the Nordsieck vector.- Returns:
- Nordsieck vector
-
computeInterpolatedStateAndDerivatives
protected ODEStateAndDerivative computeInterpolatedStateAndDerivatives(EquationsMapper equationsMapper, double time, double theta, double thetaH, double oneMinusThetaH) Compute the state and derivatives at the interpolated time. This is the main processing method that should be implemented by the derived classes to perform the interpolation.- Specified by:
computeInterpolatedStateAndDerivatives
in classAbstractODEStateInterpolator
- Parameters:
equationsMapper
- mapper for ODE equations primary and secondary componentstime
- interpolation timetheta
- normalized interpolation abscissa within the step (theta is zero at the previous time step and one at the current time step)thetaH
- time gap between the previous time and the interpolated timeoneMinusThetaH
- time gap between the interpolated time and the current time- Returns:
- interpolated state and derivatives
-
taylor
public static ODEStateAndDerivative taylor(EquationsMapper equationsMapper, ODEStateAndDerivative reference, double time, double stepSize, double[] scaled, Array2DRowRealMatrix nordsieck) Estimate state by applying Taylor formula.- Parameters:
equationsMapper
- mapper for ODE equations primary and secondary componentsreference
- reference statetime
- time at which state must be estimatedstepSize
- step size used in the scaled and Nordsieck arraysscaled
- first scaled derivativenordsieck
- Nordsieck vector- Returns:
- estimated state
-