Class DormandPrince853StepInterpolator
- All Implemented Interfaces:
Externalizable
,Serializable
,StepInterpolator
- Since:
- 1.2
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final double
Propagation weights, element 1.private static final double
Propagation weights, element 6.private static final double
Propagation weights, element 7.private static final double
Propagation weights, element 8.private static final double
Propagation weights, element 9.private static final double
Propagation weights, element 10.private static final double
Propagation weights, element 11.private static final double
Propagation weights, element 12.private static final double
Time step for stage 14 (interpolation only).private static final double
Time step for stage 15 (interpolation only).private static final double
Time step for stage 16 (interpolation only).private static final double[][]
Interpolation weights.private static final double
Internal weights for stage 14, element 1.private static final double
Internal weights for stage 14, element 6.private static final double
Internal weights for stage 14, element 7.private static final double
Internal weights for stage 14, element 8.private static final double
Internal weights for stage 14, element 9.private static final double
Internal weights for stage 14, element 10.private static final double
Internal weights for stage 14, element 11.private static final double
Internal weights for stage 14, element 12.private static final double
Internal weights for stage 14, element 13.private static final double
Internal weights for stage 15, element 1.private static final double
Internal weights for stage 15, element 6.private static final double
Internal weights for stage 15, element 7.private static final double
Internal weights for stage 15, element 8.private static final double
Internal weights for stage 15, element 9.private static final double
Internal weights for stage 15, element 10.private static final double
Internal weights for stage 15, element 11.private static final double
Internal weights for stage 15, element 12.private static final double
Internal weights for stage 15, element 13.private static final double
Internal weights for stage 15, element 14.private static final double
Internal weights for stage 16, element 1.private static final double
Internal weights for stage 16, element 6.private static final double
Internal weights for stage 16, element 7.private static final double
Internal weights for stage 16, element 8.private static final double
Internal weights for stage 16, element 9.private static final double
Internal weights for stage 16, element 10.private static final double
Internal weights for stage 16, element 11.private static final double
Internal weights for stage 16, element 12.private static final double
Internal weights for stage 16, element 13.private static final double
Internal weights for stage 16, element 14.private static final double
Internal weights for stage 16, element 15.private static final long
Serializable version identifier.private double[][]
Vectors for interpolation.private boolean
Initialization indicator for the interpolation vectors.private double[][]
Last evaluations.Fields inherited from class org.apache.commons.math3.ode.nonstiff.RungeKuttaStepInterpolator
integrator, previousState, yDotK
Fields inherited from class org.apache.commons.math3.ode.sampling.AbstractStepInterpolator
currentState, h, interpolatedDerivatives, interpolatedPrimaryDerivatives, interpolatedPrimaryState, interpolatedSecondaryDerivatives, interpolatedSecondaryState, interpolatedState, interpolatedTime
-
Constructor Summary
ConstructorsConstructorDescriptionSimple constructor.Copy constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
computeInterpolatedStateAndDerivatives
(double theta, double oneMinusThetaH) Compute the state and derivatives at the interpolated time.protected StepInterpolator
doCopy()
Really copy the finalized instance.protected void
Really finalize the step.void
void
reinitialize
(AbstractIntegrator integrator, double[] y, double[][] yDotK, boolean forward, EquationsMapper primaryMapper, EquationsMapper[] secondaryMappers) Reinitialize the instancevoid
storeTime
(double t) Store the current step time.void
Methods inherited from class org.apache.commons.math3.ode.nonstiff.RungeKuttaStepInterpolator
shift
Methods inherited from class org.apache.commons.math3.ode.sampling.AbstractStepInterpolator
copy, finalizeStep, getCurrentTime, getGlobalCurrentTime, getGlobalPreviousTime, getInterpolatedDerivatives, getInterpolatedSecondaryDerivatives, getInterpolatedSecondaryState, getInterpolatedState, getInterpolatedTime, getPreviousTime, isForward, readBaseExternal, reinitialize, setInterpolatedTime, setSoftCurrentTime, setSoftPreviousTime, writeBaseExternal
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDSerializable version identifier.- See Also:
-
B_01
private static final double B_01Propagation weights, element 1.- See Also:
-
B_06
private static final double B_06Propagation weights, element 6.- See Also:
-
B_07
private static final double B_07Propagation weights, element 7.- See Also:
-
B_08
private static final double B_08Propagation weights, element 8.- See Also:
-
B_09
private static final double B_09Propagation weights, element 9.- See Also:
-
B_10
private static final double B_10Propagation weights, element 10.- See Also:
-
B_11
private static final double B_11Propagation weights, element 11.- See Also:
-
B_12
private static final double B_12Propagation weights, element 12.- See Also:
-
C14
private static final double C14Time step for stage 14 (interpolation only).- See Also:
-
K14_01
private static final double K14_01Internal weights for stage 14, element 1.- See Also:
-
K14_06
private static final double K14_06Internal weights for stage 14, element 6.- See Also:
-
K14_07
private static final double K14_07Internal weights for stage 14, element 7.- See Also:
-
K14_08
private static final double K14_08Internal weights for stage 14, element 8.- See Also:
-
K14_09
private static final double K14_09Internal weights for stage 14, element 9.- See Also:
-
K14_10
private static final double K14_10Internal weights for stage 14, element 10.- See Also:
-
K14_11
private static final double K14_11Internal weights for stage 14, element 11.- See Also:
-
K14_12
private static final double K14_12Internal weights for stage 14, element 12.- See Also:
-
K14_13
private static final double K14_13Internal weights for stage 14, element 13.- See Also:
-
C15
private static final double C15Time step for stage 15 (interpolation only).- See Also:
-
K15_01
private static final double K15_01Internal weights for stage 15, element 1.- See Also:
-
K15_06
private static final double K15_06Internal weights for stage 15, element 6.- See Also:
-
K15_07
private static final double K15_07Internal weights for stage 15, element 7.- See Also:
-
K15_08
private static final double K15_08Internal weights for stage 15, element 8.- See Also:
-
K15_09
private static final double K15_09Internal weights for stage 15, element 9.- See Also:
-
K15_10
private static final double K15_10Internal weights for stage 15, element 10.- See Also:
-
K15_11
private static final double K15_11Internal weights for stage 15, element 11.- See Also:
-
K15_12
private static final double K15_12Internal weights for stage 15, element 12.- See Also:
-
K15_13
private static final double K15_13Internal weights for stage 15, element 13.- See Also:
-
K15_14
private static final double K15_14Internal weights for stage 15, element 14.- See Also:
-
C16
private static final double C16Time step for stage 16 (interpolation only).- See Also:
-
K16_01
private static final double K16_01Internal weights for stage 16, element 1.- See Also:
-
K16_06
private static final double K16_06Internal weights for stage 16, element 6.- See Also:
-
K16_07
private static final double K16_07Internal weights for stage 16, element 7.- See Also:
-
K16_08
private static final double K16_08Internal weights for stage 16, element 8.- See Also:
-
K16_09
private static final double K16_09Internal weights for stage 16, element 9.- See Also:
-
K16_10
private static final double K16_10Internal weights for stage 16, element 10.- See Also:
-
K16_11
private static final double K16_11Internal weights for stage 16, element 11.- See Also:
-
K16_12
private static final double K16_12Internal weights for stage 16, element 12.- See Also:
-
K16_13
private static final double K16_13Internal weights for stage 16, element 13.- See Also:
-
K16_14
private static final double K16_14Internal weights for stage 16, element 14.- See Also:
-
K16_15
private static final double K16_15Internal weights for stage 16, element 15.- See Also:
-
D
private static final double[][] DInterpolation weights. (beware that only the non-null values are in the table) -
yDotKLast
private double[][] yDotKLastLast evaluations. -
v
private double[][] vVectors for interpolation. -
vectorsInitialized
private boolean vectorsInitializedInitialization indicator for the interpolation vectors.
-
-
Constructor Details
-
DormandPrince853StepInterpolator
public DormandPrince853StepInterpolator()Simple constructor. This constructor builds an instance that is not usable yet, thereinitialize(org.apache.commons.math3.ode.AbstractIntegrator, double[], double[][], boolean, org.apache.commons.math3.ode.EquationsMapper, org.apache.commons.math3.ode.EquationsMapper[])
method should be called before using the instance in order to initialize the internal arrays. This constructor is used only in order to delay the initialization in some cases. TheEmbeddedRungeKuttaIntegrator
uses the prototyping design pattern to create the step interpolators by cloning an uninitialized model and latter initializing the copy. -
DormandPrince853StepInterpolator
DormandPrince853StepInterpolator(DormandPrince853StepInterpolator interpolator) Copy constructor.- Parameters:
interpolator
- interpolator to copy from. The copy is a deep copy: its arrays are separated from the original arrays of the instance
-
-
Method Details
-
doCopy
Really copy the finalized instance.This method is called by
AbstractStepInterpolator.copy()
after the step has been finalized. It must perform a deep copy to have an new instance completely independent for the original instance.- Specified by:
doCopy
in classAbstractStepInterpolator
- Returns:
- a copy of the finalized instance
-
reinitialize
public void reinitialize(AbstractIntegrator integrator, double[] y, double[][] yDotK, boolean forward, EquationsMapper primaryMapper, EquationsMapper[] secondaryMappers) Reinitialize the instanceSome Runge-Kutta integrators need fewer functions evaluations than their counterpart step interpolators. So the interpolator should perform the last evaluations they need by themselves. The
RungeKuttaIntegrator
andEmbeddedRungeKuttaIntegrator
abstract classes call this method in order to let the step interpolator perform the evaluations it needs. These evaluations will be performed during the call todoFinalize
if any, i.e. only if the step handler either calls thefinalizeStep
method or thegetInterpolatedState
method (for an interpolator which needs a finalization) or if it clones the step interpolator.- Overrides:
reinitialize
in classRungeKuttaStepInterpolator
- Parameters:
integrator
- integrator being usedy
- reference to the integrator array holding the state at the end of the stepyDotK
- reference to the integrator array holding all the intermediate slopesforward
- integration direction indicatorprimaryMapper
- equations mapper for the primary equations setsecondaryMappers
- equations mappers for the secondary equations sets
-
storeTime
public void storeTime(double t) Store the current step time.- Overrides:
storeTime
in classAbstractStepInterpolator
- Parameters:
t
- current time
-
computeInterpolatedStateAndDerivatives
protected void computeInterpolatedStateAndDerivatives(double theta, double oneMinusThetaH) throws MaxCountExceededException 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 classAbstractStepInterpolator
- Parameters:
theta
- normalized interpolation abscissa within the step (theta is zero at the previous time step and one at the current time step)oneMinusThetaH
- time gap between the interpolated time and the current time- Throws:
MaxCountExceededException
- if the number of functions evaluations is exceeded
-
doFinalize
Really finalize the step. The default implementation of this method does nothing.- Overrides:
doFinalize
in classAbstractStepInterpolator
- Throws:
MaxCountExceededException
- if the number of functions evaluations is exceeded
-
writeExternal
- Specified by:
writeExternal
in interfaceExternalizable
- Overrides:
writeExternal
in classRungeKuttaStepInterpolator
- Throws:
IOException
-
readExternal
- Specified by:
readExternal
in interfaceExternalizable
- Overrides:
readExternal
in classRungeKuttaStepInterpolator
- Throws:
IOException
ClassNotFoundException
-