Class AdamsFieldStateInterpolator<T extends CalculusFieldElement<T>>
- java.lang.Object
-
- org.hipparchus.ode.sampling.AbstractFieldODEStateInterpolator<T>
-
- org.hipparchus.ode.nonstiff.interpolators.AdamsFieldStateInterpolator<T>
-
- Type Parameters:
T
- the type of the field elements
- All Implemented Interfaces:
FieldODEStateInterpolator<T>
public class AdamsFieldStateInterpolator<T extends CalculusFieldElement<T>> extends AbstractFieldODEStateInterpolator<T>
This class implements an interpolator for Adams integrators using Nordsieck representation.This interpolator computes dense output around the current point. The interpolation equation is based on Taylor series formulas.
-
-
Constructor Summary
Constructors Constructor Description AdamsFieldStateInterpolator(T stepSize, FieldODEStateAndDerivative<T> reference, T[] scaled, Array2DRowFieldMatrix<T> nordsieck, boolean isForward, FieldODEStateAndDerivative<T> globalPreviousState, FieldODEStateAndDerivative<T> globalCurrentState, FieldEquationsMapper<T> equationsMapper)
Simple constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected FieldODEStateAndDerivative<T>
computeInterpolatedStateAndDerivatives(FieldEquationsMapper<T> equationsMapper, T time, T theta, T thetaH, T oneMinusThetaH)
Compute the state and derivatives at the interpolated time.protected AdamsFieldStateInterpolator<T>
create(boolean newForward, FieldODEStateAndDerivative<T> newGlobalPreviousState, FieldODEStateAndDerivative<T> newGlobalCurrentState, FieldODEStateAndDerivative<T> newSoftPreviousState, FieldODEStateAndDerivative<T> newSoftCurrentState, FieldEquationsMapper<T> newMapper)
Create a new instance.Array2DRowFieldMatrix<T>
getNordsieck()
Get the Nordsieck vector.T[]
getScaled()
Get the first scaled derivative.static <S extends CalculusFieldElement<S>>
FieldODEStateAndDerivative<S>taylor(FieldEquationsMapper<S> equationsMapper, FieldODEStateAndDerivative<S> reference, S time, S stepSize, S[] scaled, Array2DRowFieldMatrix<S> nordsieck)
Estimate state by applying Taylor formula.-
Methods inherited from class org.hipparchus.ode.sampling.AbstractFieldODEStateInterpolator
getCurrentState, getGlobalCurrentState, getGlobalPreviousState, getInterpolatedState, getMapper, getPreviousState, isCurrentStateInterpolated, isForward, isPreviousStateInterpolated, restrictStep
-
-
-
-
Constructor Detail
-
AdamsFieldStateInterpolator
public AdamsFieldStateInterpolator(T stepSize, FieldODEStateAndDerivative<T> reference, T[] scaled, Array2DRowFieldMatrix<T> nordsieck, boolean isForward, FieldODEStateAndDerivative<T> globalPreviousState, FieldODEStateAndDerivative<T> globalCurrentState, FieldEquationsMapper<T> 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 Detail
-
create
protected AdamsFieldStateInterpolator<T> create(boolean newForward, FieldODEStateAndDerivative<T> newGlobalPreviousState, FieldODEStateAndDerivative<T> newGlobalCurrentState, FieldODEStateAndDerivative<T> newSoftPreviousState, FieldODEStateAndDerivative<T> newSoftCurrentState, FieldEquationsMapper<T> newMapper)
Create a new instance.- Specified by:
create
in classAbstractFieldODEStateInterpolator<T extends CalculusFieldElement<T>>
- 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 T[] getScaled()
Get the first scaled derivative.- Returns:
- first scaled derivative
-
getNordsieck
public Array2DRowFieldMatrix<T> getNordsieck()
Get the Nordsieck vector.- Returns:
- Nordsieck vector
-
computeInterpolatedStateAndDerivatives
protected FieldODEStateAndDerivative<T> computeInterpolatedStateAndDerivatives(FieldEquationsMapper<T> equationsMapper, 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:
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 <S extends CalculusFieldElement<S>> FieldODEStateAndDerivative<S> taylor(FieldEquationsMapper<S> equationsMapper, FieldODEStateAndDerivative<S> reference, S time, S stepSize, S[] scaled, Array2DRowFieldMatrix<S> nordsieck)
Estimate state by applying Taylor formula.- Type Parameters:
S
- the type of the field elements- 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
-
-