Class DormandPrince54StepInterpolator
- All Implemented Interfaces:
Externalizable, Serializable, StepInterpolator
- Since:
- 1.2
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final doubleLast row of the Butcher-array internal weights, element 0.private static final doubleLast row of the Butcher-array internal weights, element 2.private static final doubleLast row of the Butcher-array internal weights, element 3.private static final doubleLast row of the Butcher-array internal weights, element 4.private static final doubleLast row of the Butcher-array internal weights, element 5.private static final doubleShampine (1986) Dense output, element 0.private static final doubleShampine (1986) Dense output, element 2.private static final doubleShampine (1986) Dense output, element 3.private static final doubleShampine (1986) Dense output, element 4.private static final doubleShampine (1986) Dense output, element 5.private static final doubleShampine (1986) Dense output, element 6.private static final longSerializable version identifier.private double[]First vector for interpolation.private double[]Second vector for interpolation.private double[]Third vector for interpolation.private double[]Fourth vector for interpolation.private booleanInitialization indicator for the interpolation vectors.Fields inherited from class RungeKuttaStepInterpolator
integrator, previousState, yDotK -
Constructor Summary
ConstructorsConstructorDescriptionSimple constructor.Copy constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcomputeInterpolatedStateAndDerivatives(double theta, double oneMinusThetaH) Compute the state and derivatives at the interpolated time.protected StepInterpolatordoCopy()Really copy the finalized instance.voidreinitialize(AbstractIntegrator integrator, double[] y, double[][] yDotK, boolean forward, EquationsMapper primaryMapper, EquationsMapper[] secondaryMappers) Reinitialize the instancevoidstoreTime(double t) Store the current step time.Methods inherited from class RungeKuttaStepInterpolator
readExternal, shift, writeExternalMethods inherited from class AbstractStepInterpolator
copy, doFinalize, finalizeStep, getCurrentTime, getGlobalCurrentTime, getGlobalPreviousTime, getInterpolatedDerivatives, getInterpolatedSecondaryDerivatives, getInterpolatedSecondaryState, getInterpolatedState, getInterpolatedTime, getPreviousTime, isForward, readBaseExternal, reinitialize, setInterpolatedTime, setSoftCurrentTime, setSoftPreviousTime, writeBaseExternal
-
Field Details
-
A70
private static final double A70Last row of the Butcher-array internal weights, element 0.- See Also:
-
A72
private static final double A72Last row of the Butcher-array internal weights, element 2.- See Also:
-
A73
private static final double A73Last row of the Butcher-array internal weights, element 3.- See Also:
-
A74
private static final double A74Last row of the Butcher-array internal weights, element 4.- See Also:
-
A75
private static final double A75Last row of the Butcher-array internal weights, element 5.- See Also:
-
D0
private static final double D0Shampine (1986) Dense output, element 0.- See Also:
-
D2
private static final double D2Shampine (1986) Dense output, element 2.- See Also:
-
D3
private static final double D3Shampine (1986) Dense output, element 3.- See Also:
-
D4
private static final double D4Shampine (1986) Dense output, element 4.- See Also:
-
D5
private static final double D5Shampine (1986) Dense output, element 5.- See Also:
-
D6
private static final double D6Shampine (1986) Dense output, element 6.- See Also:
-
serialVersionUID
private static final long serialVersionUIDSerializable version identifier.- See Also:
-
v1
private double[] v1First vector for interpolation. -
v2
private double[] v2Second vector for interpolation. -
v3
private double[] v3Third vector for interpolation. -
v4
private double[] v4Fourth vector for interpolation. -
vectorsInitialized
private boolean vectorsInitializedInitialization indicator for the interpolation vectors.
-
-
Constructor Details
-
DormandPrince54StepInterpolator
public DormandPrince54StepInterpolator()Simple constructor. This constructor builds an instance that is not usable yet, thereinitialize(AbstractIntegrator, double[], double[][], boolean, EquationsMapper, 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. TheEmbeddedRungeKuttaIntegratoruses the prototyping design pattern to create the step interpolators by cloning an uninitialized model and latter initializing the copy. -
DormandPrince54StepInterpolator
DormandPrince54StepInterpolator(DormandPrince54StepInterpolator 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:
doCopyin 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
RungeKuttaIntegratorandEmbeddedRungeKuttaIntegratorabstract classes call this method in order to let the step interpolator perform the evaluations it needs. These evaluations will be performed during the call todoFinalizeif any, i.e. only if the step handler either calls thefinalizeStepmethod or thegetInterpolatedStatemethod (for an interpolator which needs a finalization) or if it clones the step interpolator.- Overrides:
reinitializein 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:
storeTimein classAbstractStepInterpolator- Parameters:
t- current time
-
computeInterpolatedStateAndDerivatives
protected void computeInterpolatedStateAndDerivatives(double theta, 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:
computeInterpolatedStateAndDerivativesin 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
-