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

public Class DormandPrince853Integrator

extends EmbeddedRungeKuttaIntegrator
Class Inheritance
Imports
org.apache.commons.math3.util.FastMath

This class implements the 8(5,3) Dormand-Prince integrator for Ordinary Differential Equations.

This integrator is an embedded Runge-Kutta integrator of order 8(5,3) used in local extrapolation mode (i.e. the solution is computed using the high order formula) with stepsize control (and automatic step initialization) and continuous output. This method uses 12 functions evaluations per step for integration and 4 evaluations for interpolation. However, since the first interpolation evaluation is the same as the first integration evaluation of the next step, we have included it in the integrator rather than in the interpolator and specified the method was an fsal. Hence, despite we have 13 stages here, the cost is really 12 evaluations per step even if no interpolation is done, and the overcost of interpolation is only 3 evaluations.

This method is based on an 8(6) method by Dormand and Prince (i.e. order 8 for the integration and order 6 for error estimation) modified by Hairer and Wanner to use a 5th order error estimator with 3rd order correction. This modification was introduced because the original method failed in some cases (wrong steps can be accepted when step size is too large, for example in the Brusselator problem) and also had severe difficulties when applied to problems with discontinuities. This modification is explained in the second edition of the first volume (Nonstiff Problems) of the reference book by Hairer, Norsett and Wanner: Solving Ordinary Differential Equations (Springer-Verlag, ISBN 3-540-56670-8).

Since
1.2

Field Summary

Modifier and TypeField and Description
private static final double
E1_01

First error weights array, element 1.

private static final double
E1_06

First error weights array, element 6.

private static final double
E1_07

First error weights array, element 7.

private static final double
E1_08

First error weights array, element 8.

private static final double
E1_09

First error weights array, element 9.

private static final double
E1_10

First error weights array, element 10.

private static final double
E1_11

First error weights array, element 11.

private static final double
E1_12

First error weights array, element 12.

private static final double
E2_01

Second error weights array, element 1.

private static final double
E2_06

Second error weights array, element 6.

private static final double
E2_07

Second error weights array, element 7.

private static final double
E2_08

Second error weights array, element 8.

private static final double
E2_09

Second error weights array, element 9.

private static final double
E2_10

Second error weights array, element 10.

private static final double
E2_11

Second error weights array, element 11.

private static final double
E2_12

Second error weights array, element 12.

private static final String
METHOD_NAME

Integrator method name.

private static final double[][]
STATIC_A

Internal weights Butcher array.

private static final double[]
STATIC_B

Propagation weights Butcher array.

private static final double[]
STATIC_C

Time steps Butcher array.

Constructor Summary

AccessConstructor and Description
public
DormandPrince853Integrator(final double
minimal step (sign is irrelevant, regardless of integration direction, forward or backward), the last step can be smaller than this
minStep
,
final double
maximal step (sign is irrelevant, regardless of integration direction, forward or backward), the last step can be smaller than this
maxStep
,
final double
allowed absolute error
scalAbsoluteTolerance
,
final double
allowed relative error
scalRelativeTolerance
)

Simple constructor.

public
DormandPrince853Integrator(final double
minimal step (sign is irrelevant, regardless of integration direction, forward or backward), the last step can be smaller than this
minStep
,
final double
maximal step (sign is irrelevant, regardless of integration direction, forward or backward), the last step can be smaller than this
maxStep
,
final double[]
allowed absolute error
vecAbsoluteTolerance
,
final double[]
allowed relative error
vecRelativeTolerance
)

Simple constructor.

Method Summary

Modifier and TypeMethod and Description
protected double
estimateError(final double[][]
derivatives computed during the first stages
yDotK
,
final double[]
estimate of the step at the start of the step
y0
,
final double[]
estimate of the step at the end of the step
y1
,
final double
current step
h
)

Implements abstract org.apache.commons.math3.ode.nonstiff.EmbeddedRungeKuttaIntegrator.estimateError.

Compute the error ratio.

public int
Inherited from org.apache.commons.math3.ode.nonstiff.EmbeddedRungeKuttaIntegrator:
getMaxGrowthgetMinReductiongetSafetyintegratesetMaxGrowthsetMinReductionsetSafety

Field Detail

E1_01back to summary
private static final double E1_01

First error weights array, element 1.

E1_06back to summary
private static final double E1_06

First error weights array, element 6.

E1_07back to summary
private static final double E1_07

First error weights array, element 7.

E1_08back to summary
private static final double E1_08

First error weights array, element 8.

E1_09back to summary
private static final double E1_09

First error weights array, element 9.

E1_10back to summary
private static final double E1_10

First error weights array, element 10.

E1_11back to summary
private static final double E1_11

First error weights array, element 11.

E1_12back to summary
private static final double E1_12

First error weights array, element 12.

E2_01back to summary
private static final double E2_01

Second error weights array, element 1.

E2_06back to summary
private static final double E2_06

Second error weights array, element 6.

E2_07back to summary
private static final double E2_07

Second error weights array, element 7.

E2_08back to summary
private static final double E2_08

Second error weights array, element 8.

E2_09back to summary
private static final double E2_09

Second error weights array, element 9.

E2_10back to summary
private static final double E2_10

Second error weights array, element 10.

E2_11back to summary
private static final double E2_11

Second error weights array, element 11.

E2_12back to summary
private static final double E2_12

Second error weights array, element 12.

METHOD_NAMEback to summary
private static final String METHOD_NAME

Integrator method name.

STATIC_Aback to summary
private static final double[][] STATIC_A

Internal weights Butcher array.

STATIC_Bback to summary
private static final double[] STATIC_B

Propagation weights Butcher array.

STATIC_Cback to summary
private static final double[] STATIC_C

Time steps Butcher array.

Constructor Detail

DormandPrince853Integratorback to summary
public DormandPrince853Integrator(final double minStep, final double maxStep, final double scalAbsoluteTolerance, final double scalRelativeTolerance)

Simple constructor. Build an eighth order Dormand-Prince integrator with the given step bounds

Parameters
minStep:double

minimal step (sign is irrelevant, regardless of integration direction, forward or backward), the last step can be smaller than this

maxStep:double

maximal step (sign is irrelevant, regardless of integration direction, forward or backward), the last step can be smaller than this

scalAbsoluteTolerance:double

allowed absolute error

scalRelativeTolerance:double

allowed relative error

DormandPrince853Integratorback to summary
public DormandPrince853Integrator(final double minStep, final double maxStep, final double[] vecAbsoluteTolerance, final double[] vecRelativeTolerance)

Simple constructor. Build an eighth order Dormand-Prince integrator with the given step bounds

Parameters
minStep:double

minimal step (sign is irrelevant, regardless of integration direction, forward or backward), the last step can be smaller than this

maxStep:double

maximal step (sign is irrelevant, regardless of integration direction, forward or backward), the last step can be smaller than this

vecAbsoluteTolerance:double[]

allowed absolute error

vecRelativeTolerance:double[]

allowed relative error

Method Detail

estimateErrorback to summary
protected double estimateError(final double[][] yDotK, final double[] y0, final double[] y1, final double h)

Implements abstract org.apache.commons.math3.ode.nonstiff.EmbeddedRungeKuttaIntegrator.estimateError.

Doc from org.apache.commons.math3.ode.nonstiff.EmbeddedRungeKuttaIntegrator.estimateError.

Compute the error ratio.

Parameters
yDotK:double[][]

derivatives computed during the first stages

y0:double[]

estimate of the step at the start of the step

y1:double[]

estimate of the step at the end of the step

h:double

current step

Returns:double

error ratio, greater than 1 if step should be rejected

Annotations
@Override
getOrderback to summary
public int getOrder()

Implements abstract org.apache.commons.math3.ode.nonstiff.EmbeddedRungeKuttaIntegrator.getOrder.

Doc from org.apache.commons.math3.ode.nonstiff.EmbeddedRungeKuttaIntegrator.getOrder.

Get the order of the method.

Returns:int

order of the method

Annotations
@Override