Class GillFieldStateInterpolator<T extends CalculusFieldElement<T>>
java.lang.Object
org.hipparchus.ode.sampling.AbstractFieldODEStateInterpolator<T>
org.hipparchus.ode.nonstiff.interpolators.RungeKuttaFieldStateInterpolator<T>
org.hipparchus.ode.nonstiff.interpolators.GillFieldStateInterpolator<T>
- Type Parameters:
T
- the type of the field elements
- All Implemented Interfaces:
FieldODEStateInterpolator<T>
public class GillFieldStateInterpolator<T extends CalculusFieldElement<T>>
extends RungeKuttaFieldStateInterpolator<T>
This class implements a step interpolator for the Gill fourth
order Runge-Kutta integrator.
This interpolator allows to compute dense output inside the last step computed. The interpolation equation is consistent with the integration scheme :
- Using reference point at step start:
y(tn + θ h) = y (tn) + θ (h/6) [ (6 - 9 θ + 4 θ2) y'1 + ( 6 θ - 4 θ2) ((1-1/√2) y'2 + (1+1/√2)) y'3) + ( - 3 θ + 4 θ2) y'4 ] - Using reference point at step start:
y(tn + θ h) = y (tn + h) - (1 - θ) (h/6) [ (1 - 5 θ + 4 θ2) y'1 + (2 + 2 θ - 4 θ2) ((1-1/√2) y'2 + (1+1/√2)) y'3) + (1 + θ + 4 θ2) y'4 ]
where θ belongs to [0 ; 1] and where y'1 to y'4 are the four evaluations of the derivatives already computed during the step.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionGillFieldStateInterpolator
(Field<T> field, boolean forward, T[][] yDotK, FieldODEStateAndDerivative<T> globalPreviousState, FieldODEStateAndDerivative<T> globalCurrentState, FieldODEStateAndDerivative<T> softPreviousState, FieldODEStateAndDerivative<T> softCurrentState, FieldEquationsMapper<T> mapper) Simple constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected FieldODEStateAndDerivative
<T> computeInterpolatedStateAndDerivatives
(FieldEquationsMapper<T> mapper, T time, T theta, T thetaH, T oneMinusThetaH) Compute the state and derivatives at the interpolated time.protected GillFieldStateInterpolator
<T> create
(Field<T> newField, boolean newForward, T[][] newYDotK, FieldODEStateAndDerivative<T> newGlobalPreviousState, FieldODEStateAndDerivative<T> newGlobalCurrentState, FieldODEStateAndDerivative<T> newSoftPreviousState, FieldODEStateAndDerivative<T> newSoftCurrentState, FieldEquationsMapper<T> newMapper) Create a new instance.Methods inherited from class org.hipparchus.ode.nonstiff.interpolators.RungeKuttaFieldStateInterpolator
create, currentStateLinearCombination, derivativeLinearCombination, previousStateLinearCombination
Methods inherited from class org.hipparchus.ode.sampling.AbstractFieldODEStateInterpolator
getCurrentState, getGlobalCurrentState, getGlobalPreviousState, getInterpolatedState, getMapper, getPreviousState, isCurrentStateInterpolated, isForward, isPreviousStateInterpolated, restrictStep
-
Constructor Details
-
GillFieldStateInterpolator
public GillFieldStateInterpolator(Field<T> field, boolean forward, T[][] yDotK, FieldODEStateAndDerivative<T> globalPreviousState, FieldODEStateAndDerivative<T> globalCurrentState, FieldODEStateAndDerivative<T> softPreviousState, FieldODEStateAndDerivative<T> softCurrentState, FieldEquationsMapper<T> mapper) Simple constructor.- Parameters:
field
- field to which the time and state vector elements belongforward
- integration direction indicatoryDotK
- slopes at the intermediate pointsglobalPreviousState
- start of the global stepglobalCurrentState
- end of the global stepsoftPreviousState
- start of the restricted stepsoftCurrentState
- end of the restricted stepmapper
- equations mapper for the all equations
-
-
Method Details
-
create
protected GillFieldStateInterpolator<T> create(Field<T> newField, boolean newForward, T[][] newYDotK, FieldODEStateAndDerivative<T> newGlobalPreviousState, FieldODEStateAndDerivative<T> newGlobalCurrentState, FieldODEStateAndDerivative<T> newSoftPreviousState, FieldODEStateAndDerivative<T> newSoftCurrentState, FieldEquationsMapper<T> newMapper) Create a new instance.- Specified by:
create
in classRungeKuttaFieldStateInterpolator<T extends CalculusFieldElement<T>>
- Parameters:
newField
- field to which the time and state vector elements belongnewForward
- integration direction indicatornewYDotK
- slopes at the intermediate pointsnewGlobalPreviousState
- 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
-
computeInterpolatedStateAndDerivatives
protected FieldODEStateAndDerivative<T> computeInterpolatedStateAndDerivatives(FieldEquationsMapper<T> mapper, T time, T theta, T thetaH, T 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 classAbstractFieldODEStateInterpolator<T extends CalculusFieldElement<T>>
- Parameters:
mapper
- 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
-