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

pack-priv Class DormandPrince54StepInterpolator

extends RungeKuttaStepInterpolator
Class Inheritance
Imports
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 5(4) Dormand-Prince integrator.
Since
1.2
See Also
DormandPrince54Integrator

Field Summary

Modifier and TypeField and Description
private static final double
A70

Last row of the Butcher-array internal weights, element 0.

private static final double
A72

Last row of the Butcher-array internal weights, element 2.

private static final double
A73

Last row of the Butcher-array internal weights, element 3.

private static final double
A74

Last row of the Butcher-array internal weights, element 4.

private static final double
A75

Last row of the Butcher-array internal weights, element 5.

private static final double
D0

Shampine (1986) Dense output, element 0.

private static final double
D2

Shampine (1986) Dense output, element 2.

private static final double
D3

Shampine (1986) Dense output, element 3.

private static final double
D4

Shampine (1986) Dense output, element 4.

private static final double
D5

Shampine (1986) Dense output, element 5.

private static final double
D6

Shampine (1986) Dense output, element 6.

private static final long
serialVersionUID

Serializable version identifier.

private double[]
v1

First vector for interpolation.

private double[]
v2

Second vector for interpolation.

private double[]
v3

Third vector for interpolation.

private double[]
v4

Fourth vector for interpolation.

private boolean
vectorsInitialized

Initialization indicator for the interpolation vectors.

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

Constructor Summary

AccessConstructor and Description
public
DormandPrince54StepInterpolator()

Simple constructor.

pack-priv
DormandPrince54StepInterpolator(final DormandPrince54StepInterpolator
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.

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.

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

Field Detail

A70back to summary
private static final double A70

Last row of the Butcher-array internal weights, element 0.

A72back to summary
private static final double A72

Last row of the Butcher-array internal weights, element 2.

A73back to summary
private static final double A73

Last row of the Butcher-array internal weights, element 3.

A74back to summary
private static final double A74

Last row of the Butcher-array internal weights, element 4.

A75back to summary
private static final double A75

Last row of the Butcher-array internal weights, element 5.

D0back to summary
private static final double D0

Shampine (1986) Dense output, element 0.

D2back to summary
private static final double D2

Shampine (1986) Dense output, element 2.

D3back to summary
private static final double D3

Shampine (1986) Dense output, element 3.

D4back to summary
private static final double D4

Shampine (1986) Dense output, element 4.

D5back to summary
private static final double D5

Shampine (1986) Dense output, element 5.

D6back to summary
private static final double D6

Shampine (1986) Dense output, element 6.

serialVersionUIDback to summary
private static final long serialVersionUID

Serializable version identifier.

v1back to summary
private double[] v1

First vector for interpolation.

v2back to summary
private double[] v2

Second vector for interpolation.

v3back to summary
private double[] v3

Third vector for interpolation.

v4back to summary
private double[] v4

Fourth vector for interpolation.

vectorsInitializedback to summary
private boolean vectorsInitialized

Initialization indicator for the interpolation vectors.

Constructor Detail

DormandPrince54StepInterpolatorback to summary
public DormandPrince54StepInterpolator()

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.

DormandPrince54StepInterpolatorback to summary
pack-priv DormandPrince54StepInterpolator(final DormandPrince54StepInterpolator interpolator)

Copy constructor.

Parameters
interpolator:DormandPrince54StepInterpolator

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)

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
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
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