Top Description Fields Constructors Methods
org.apache.commons.math3.ode.nonstiff

pack-priv Class DormandPrince853StepInterpolator

extends RungeKuttaStepInterpolator
Class Inheritance
Imports
java.io.IOException, .ObjectInput, .ObjectOutput, org.apache.commons.math3.exception.MaxCountExceededException, org.apache.commons.math3.ode.AbstractIntegrator, .EquationsMapper, org.apache.commons.math3.ode.sampling.StepInterpolator

This class represents an interpolator over the last step during an ODE integration for the 8(5,3) Dormand-Prince integrator.
Since
1.2
See Also
DormandPrince853Integrator

Field Summary

Modifier and TypeField and Description
private static final double
B_01

Propagation weights, element 1.

private static final double
B_06

Propagation weights, element 6.

private static final double
B_07

Propagation weights, element 7.

private static final double
B_08

Propagation weights, element 8.

private static final double
B_09

Propagation weights, element 9.

private static final double
B_10

Propagation weights, element 10.

private static final double
B_11

Propagation weights, element 11.

private static final double
B_12

Propagation weights, element 12.

private static final double
C14

Time step for stage 14 (interpolation only).

private static final double
C15

Time step for stage 15 (interpolation only).

private static final double
C16

Time step for stage 16 (interpolation only).

private static final double[][]
D

Interpolation weights.

private static final double
K14_01

Internal weights for stage 14, element 1.

private static final double
K14_06

Internal weights for stage 14, element 6.

private static final double
K14_07

Internal weights for stage 14, element 7.

private static final double
K14_08

Internal weights for stage 14, element 8.

private static final double
K14_09

Internal weights for stage 14, element 9.

private static final double
K14_10

Internal weights for stage 14, element 10.

private static final double
K14_11

Internal weights for stage 14, element 11.

private static final double
K14_12

Internal weights for stage 14, element 12.

private static final double
K14_13

Internal weights for stage 14, element 13.

private static final double
K15_01

Internal weights for stage 15, element 1.

private static final double
K15_06

Internal weights for stage 15, element 6.

private static final double
K15_07

Internal weights for stage 15, element 7.

private static final double
K15_08

Internal weights for stage 15, element 8.

private static final double
K15_09

Internal weights for stage 15, element 9.

private static final double
K15_10

Internal weights for stage 15, element 10.

private static final double
K15_11

Internal weights for stage 15, element 11.

private static final double
K15_12

Internal weights for stage 15, element 12.

private static final double
K15_13

Internal weights for stage 15, element 13.

private static final double
K15_14

Internal weights for stage 15, element 14.

private static final double
K16_01

Internal weights for stage 16, element 1.

private static final double
K16_06

Internal weights for stage 16, element 6.

private static final double
K16_07

Internal weights for stage 16, element 7.

private static final double
K16_08

Internal weights for stage 16, element 8.

private static final double
K16_09

Internal weights for stage 16, element 9.

private static final double
K16_10

Internal weights for stage 16, element 10.

private static final double
K16_11

Internal weights for stage 16, element 11.

private static final double
K16_12

Internal weights for stage 16, element 12.

private static final double
K16_13

Internal weights for stage 16, element 13.

private static final double
K16_14

Internal weights for stage 16, element 14.

private static final double
K16_15

Internal weights for stage 16, element 15.

private static final long
serialVersionUID

Serializable version identifier.

private double[][]
v

Vectors for interpolation.

private boolean
vectorsInitialized

Initialization indicator for the interpolation vectors.

private double[][]
yDotKLast

Last evaluations.

Inherited from org.apache.commons.math3.ode.nonstiff.RungeKuttaStepInterpolator:
integratorpreviousStateyDotK

Constructor Summary

AccessConstructor and Description
public
DormandPrince853StepInterpolator()

Simple constructor.

pack-priv
DormandPrince853StepInterpolator(final DormandPrince853StepInterpolator
interpolator to copy from. The copy is a deep copy: its arrays are separated from the original arrays of the instance
interpolator
)

Copy constructor.

Method Summary

Modifier and TypeMethod and Description
protected void
computeInterpolatedStateAndDerivatives(final double
normalized interpolation abscissa within the step (theta is zero at the previous time step and one at the current time step)
theta
,
final double
time gap between the interpolated time and the current time
oneMinusThetaH
)

Implements abstract org.apache.commons.math3.ode.sampling.AbstractStepInterpolator.computeInterpolatedStateAndDerivatives.

Compute the state and derivatives at the interpolated time.

protected StepInterpolator
doCopy()

Implements abstract org.apache.commons.math3.ode.sampling.AbstractStepInterpolator.doCopy.

Really copy the finalized instance.

protected void
public void
readExternal(final ObjectInput
the stream to read data from in order to restore the object
in
)

Overrides org.apache.commons.math3.ode.nonstiff.RungeKuttaStepInterpolator.readExternal.

Implements java.io.Externalizable.readExternal.

The object implements the readExternal method to restore its contents by calling the methods of DataInput for primitive types and readObject for objects, strings and arrays.

public void
reinitialize(final AbstractIntegrator
integrator being used
integrator
,
final double[]
reference to the integrator array holding the state at the end of the step
y
,
final double[][]
reference to the integrator array holding all the intermediate slopes
yDotK
,
final boolean
integration direction indicator
forward
,
final EquationsMapper
equations mapper for the primary equations set
primaryMapper
,
final EquationsMapper[]
equations mappers for the secondary equations sets
secondaryMappers
)

Overrides org.apache.commons.math3.ode.nonstiff.RungeKuttaStepInterpolator.reinitialize.

Reinitialize the instance

Some Runge-Kutta integrators need fewer functions evaluations than their counterpart step interpolators.

public void
storeTime(final double
current time
t
)

Overrides org.apache.commons.math3.ode.sampling.AbstractStepInterpolator.storeTime.

Store the current step time.

public void
writeExternal(final ObjectOutput
the stream to write the object to
out
)

Overrides org.apache.commons.math3.ode.nonstiff.RungeKuttaStepInterpolator.writeExternal.

Implements java.io.Externalizable.writeExternal.

The object implements the writeExternal method to save its contents by calling the methods of DataOutput for its primitive values or calling the writeObject method of ObjectOutput for objects, strings, and arrays.

Inherited from org.apache.commons.math3.ode.nonstiff.RungeKuttaStepInterpolator:
shift

Field Detail

B_01back to summary
private static final double B_01

Propagation weights, element 1.

B_06back to summary
private static final double B_06

Propagation weights, element 6.

B_07back to summary
private static final double B_07

Propagation weights, element 7.

B_08back to summary
private static final double B_08

Propagation weights, element 8.

B_09back to summary
private static final double B_09

Propagation weights, element 9.

B_10back to summary
private static final double B_10

Propagation weights, element 10.

B_11back to summary
private static final double B_11

Propagation weights, element 11.

B_12back to summary
private static final double B_12

Propagation weights, element 12.

C14back to summary
private static final double C14

Time step for stage 14 (interpolation only).

C15back to summary
private static final double C15

Time step for stage 15 (interpolation only).

C16back to summary
private static final double C16

Time step for stage 16 (interpolation only).

Dback to summary
private static final double[][] D

Interpolation weights. (beware that only the non-null values are in the table)

K14_01back to summary
private static final double K14_01

Internal weights for stage 14, element 1.

K14_06back to summary
private static final double K14_06

Internal weights for stage 14, element 6.

K14_07back to summary
private static final double K14_07

Internal weights for stage 14, element 7.

K14_08back to summary
private static final double K14_08

Internal weights for stage 14, element 8.

K14_09back to summary
private static final double K14_09

Internal weights for stage 14, element 9.

K14_10back to summary
private static final double K14_10

Internal weights for stage 14, element 10.

K14_11back to summary
private static final double K14_11

Internal weights for stage 14, element 11.

K14_12back to summary
private static final double K14_12

Internal weights for stage 14, element 12.

K14_13back to summary
private static final double K14_13

Internal weights for stage 14, element 13.

K15_01back to summary
private static final double K15_01

Internal weights for stage 15, element 1.

K15_06back to summary
private static final double K15_06

Internal weights for stage 15, element 6.

K15_07back to summary
private static final double K15_07

Internal weights for stage 15, element 7.

K15_08back to summary
private static final double K15_08

Internal weights for stage 15, element 8.

K15_09back to summary
private static final double K15_09

Internal weights for stage 15, element 9.

K15_10back to summary
private static final double K15_10

Internal weights for stage 15, element 10.

K15_11back to summary
private static final double K15_11

Internal weights for stage 15, element 11.

K15_12back to summary
private static final double K15_12

Internal weights for stage 15, element 12.

K15_13back to summary
private static final double K15_13

Internal weights for stage 15, element 13.

K15_14back to summary
private static final double K15_14

Internal weights for stage 15, element 14.

K16_01back to summary
private static final double K16_01

Internal weights for stage 16, element 1.

K16_06back to summary
private static final double K16_06

Internal weights for stage 16, element 6.

K16_07back to summary
private static final double K16_07

Internal weights for stage 16, element 7.

K16_08back to summary
private static final double K16_08

Internal weights for stage 16, element 8.

K16_09back to summary
private static final double K16_09

Internal weights for stage 16, element 9.

K16_10back to summary
private static final double K16_10

Internal weights for stage 16, element 10.

K16_11back to summary
private static final double K16_11

Internal weights for stage 16, element 11.

K16_12back to summary
private static final double K16_12

Internal weights for stage 16, element 12.

K16_13back to summary
private static final double K16_13

Internal weights for stage 16, element 13.

K16_14back to summary
private static final double K16_14

Internal weights for stage 16, element 14.

K16_15back to summary
private static final double K16_15

Internal weights for stage 16, element 15.

serialVersionUIDback to summary
private static final long serialVersionUID

Serializable version identifier.

vback to summary
private double[][] v

Vectors for interpolation.

vectorsInitializedback to summary
private boolean vectorsInitialized

Initialization indicator for the interpolation vectors.

yDotKLastback to summary
private double[][] yDotKLast

Last evaluations.

Constructor Detail

DormandPrince853StepInterpolatorback to summary
public DormandPrince853StepInterpolator()

Simple constructor. This constructor builds an instance that is not usable yet, the reinitialize 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. The EmbeddedRungeKuttaIntegrator uses the prototyping design pattern to create the step interpolators by cloning an uninitialized model and latter initializing the copy.

DormandPrince853StepInterpolatorback to summary
pack-priv DormandPrince853StepInterpolator(final DormandPrince853StepInterpolator interpolator)

Copy constructor.

Parameters
interpolator:DormandPrince853StepInterpolator

interpolator to copy from. The copy is a deep copy: its arrays are separated from the original arrays of the instance

Method Detail

computeInterpolatedStateAndDerivativesback to summary
protected void computeInterpolatedStateAndDerivatives(final double theta, final double oneMinusThetaH) throws MaxCountExceededException

Implements abstract org.apache.commons.math3.ode.sampling.AbstractStepInterpolator.computeInterpolatedStateAndDerivatives.

Doc from org.apache.commons.math3.ode.sampling.AbstractStepInterpolator.computeInterpolatedStateAndDerivatives.

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.

Parameters
theta:double

normalized interpolation abscissa within the step (theta is zero at the previous time step and one at the current time step)

oneMinusThetaH:double

time gap between the interpolated time and the current time

Annotations
@Override
Exceptions
MaxCountExceededException:
if the number of functions evaluations is exceeded
doCopyback to summary
protected StepInterpolator doCopy()

Implements abstract org.apache.commons.math3.ode.sampling.AbstractStepInterpolator.doCopy.

Doc from org.apache.commons.math3.ode.sampling.AbstractStepInterpolator.doCopy.

Really copy the finalized instance.

This method is called by copy() after the step has been finalized. It must perform a deep copy to have an new instance completely independent for the original instance.

Returns:StepInterpolator

a copy of the finalized instance

Annotations
@Override
doFinalizeback to summary
protected void doFinalize() throws MaxCountExceededException

Overrides org.apache.commons.math3.ode.sampling.AbstractStepInterpolator.doFinalize.

Doc from org.apache.commons.math3.ode.sampling.AbstractStepInterpolator.doFinalize.

Really finalize the step. The default implementation of this method does nothing.

Annotations
@Override
Exceptions
MaxCountExceededException:
if the number of functions evaluations is exceeded
readExternalback to summary
public void readExternal(final ObjectInput in) throws IOException, ClassNotFoundException

Overrides org.apache.commons.math3.ode.nonstiff.RungeKuttaStepInterpolator.readExternal.

Implements java.io.Externalizable.readExternal.

Doc from org.apache.commons.math3.ode.nonstiff.RungeKuttaStepInterpolator.readExternal.

The object implements the readExternal method to restore its contents by calling the methods of DataInput for primitive types and readObject for objects, strings and arrays. The readExternal method must read the values in the same sequence and with the same types as were written by writeExternal.

Parameters
in:ObjectInput

Doc from java.io.Externalizable.readExternal.

the stream to read data from in order to restore the object

Annotations
@Override
Exceptions
IOException:

Doc from java.io.Externalizable.readExternal.

if I/O errors occur

ClassNotFoundException:

Doc from java.io.Externalizable.readExternal.

If the class for an object being restored cannot be found.

reinitializeback to summary
public void reinitialize(final AbstractIntegrator integrator, final double[] y, final double[][] yDotK, final boolean forward, final EquationsMapper primaryMapper, final EquationsMapper[] secondaryMappers)

Overrides org.apache.commons.math3.ode.nonstiff.RungeKuttaStepInterpolator.reinitialize.

Doc from org.apache.commons.math3.ode.nonstiff.RungeKuttaStepInterpolator.reinitialize.

Reinitialize the instance

Some 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 and EmbeddedRungeKuttaIntegrator 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 to doFinalize if any, i.e. only if the step handler either calls the finalizeStep method or the getInterpolatedState method (for an interpolator which needs a finalization) or if it clones the step interpolator.

Parameters
integrator:AbstractIntegrator

integrator being used

y:double[]

reference to the integrator array holding the state at the end of the step

yDotK:double[][]

reference to the integrator array holding all the intermediate slopes

forward:boolean

integration direction indicator

primaryMapper:EquationsMapper

equations mapper for the primary equations set

secondaryMappers:EquationsMapper[]

equations mappers for the secondary equations sets

Annotations
@Override
storeTimeback to summary
public void storeTime(final double t)

Overrides org.apache.commons.math3.ode.sampling.AbstractStepInterpolator.storeTime.

Doc from org.apache.commons.math3.ode.sampling.AbstractStepInterpolator.storeTime.

Store the current step time.

Parameters
t:double

current time

Annotations
@Override
writeExternalback to summary
public void writeExternal(final ObjectOutput out) throws IOException

Overrides org.apache.commons.math3.ode.nonstiff.RungeKuttaStepInterpolator.writeExternal.

Implements java.io.Externalizable.writeExternal.

Doc from org.apache.commons.math3.ode.nonstiff.RungeKuttaStepInterpolator.writeExternal.

The object implements the writeExternal method to save its contents by calling the methods of DataOutput for its primitive values or calling the writeObject method of ObjectOutput for objects, strings, and arrays.

Parameters
out:ObjectOutput

Doc from java.io.Externalizable.writeExternal.

the stream to write the object to

Annotations
@Override
Exceptions
IOException:

Doc from java.io.Externalizable.writeExternal.

Includes any I/O exceptions that may occur