These methods are embedded explicit Runge-Kutta methods with two sets of coefficients allowing to estimate the error, their Butcher arrays are as follows :
0 |
c2 | a21
c3 | a31 a32
... | ...
cs | as1 as2 ... ass-1
|--------------------------
| b1 b2 ... bs-1 bs
| b'1 b'2 ... b's-1 b's
In fact, we rather use the array defined by ej = bj - b'j to compute directly the error rather than computing two estimates and then comparing them.
Some methods are qualified as fsal (first same as last) methods. This means the last evaluation of the derivatives in one step is the same as the first in the next step. Then, this evaluation can be reused from one step to the next one and the cost of such a method is really s-1 evaluations despite the method still has s stages. This behaviour is true only for successful steps, if the step is rejected after the error estimation phase, no evaluation is saved. For an fsal method, we have cs = 1 and asi = bi for all i.
| Modifier and Type | Field and Description |
|---|---|
| private final double[][] | a
Internal weights from Butcher array (without the first empty row). |
| private final double[] | b
External weights for the high order method from Butcher array. |
| private final double[] | c
Time steps from Butcher array (without the first zero). |
| private final double | exp
Stepsize control exponent. |
| private final boolean | fsal
Indicator for fsal methods. |
| private double | maxGrowth
Maximal growth factor for stepsize control. |
| private double | minReduction
Minimal reduction factor for stepsize control. |
| private final RungeKuttaStepInterpolator | prototype
Prototype of the step interpolator. |
| private double | safety
Safety factor for stepsize control. |
| Access | Constructor and Description |
|---|---|
| protected | EmbeddedRungeKuttaIntegrator(final String
name of the method name, final boolean indicate that the method is an fsal fsal, final double[] time steps from Butcher array (without the first zero) c, final double[][] internal weights from Butcher array (without the first empty row) a, final double[] propagation weights for the high order method from Butcher array b, final RungeKuttaStepInterpolator prototype of the step interpolator to use prototype, 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)Build a Runge-Kutta integrator with the given Butcher array. |
| protected | EmbeddedRungeKuttaIntegrator(final String
name of the method name, final boolean indicate that the method is an fsal fsal, final double[] time steps from Butcher array (without the first zero) c, final double[][] internal weights from Butcher array (without the first empty row) a, final double[] propagation weights for the high order method from Butcher array b, final RungeKuttaStepInterpolator prototype of the step interpolator to use prototype, final double minimal step (must be positive even for backward
integration), the last step can be smaller than this minStep, final double maximal step (must be positive even for backward
integration) maxStep, final double[] allowed absolute error vecAbsoluteTolerance, final double[] allowed relative error vecRelativeTolerance)Build a Runge-Kutta integrator with the given Butcher array. |
| Modifier and Type | Method and Description |
|---|---|
| protected abstract double | Returns: error ratio, greater than 1 if step should be rejectedderivatives computed during the first stages yDotK, double[] estimate of the step at the start of the step y0, double[] estimate of the step at the end of the step y1, double current step h)Compute the error ratio. |
| public double | |
| public double | Returns: minimal reduction factorGet the minimal reduction factor for stepsize control. |
| public abstract int | |
| public double | |
| public void | integrate(final ExpandableStatefulODE
complete set of differential equations to integrate equations, final double target time for the integration
(can be set to a value smaller than t)t0 for backward integration)Implements abstract org. Integrate a set of differential equations up to the given time. |
| public void | setMaxGrowth(final double
maximal growth factor maxGrowth)Set the maximal growth factor for stepsize control. |
| public void | setMinReduction(final double
minimal reduction factor minReduction)Set the minimal reduction factor for stepsize control. |
| public void |
| a | back to summary |
|---|---|
| private final double[][] a Internal weights from Butcher array (without the first empty row). | |
| b | back to summary |
|---|---|
| private final double[] b External weights for the high order method from Butcher array. | |
| c | back to summary |
|---|---|
| private final double[] c Time steps from Butcher array (without the first zero). | |
| exp | back to summary |
|---|---|
| private final double exp Stepsize control exponent. | |
| fsal | back to summary |
|---|---|
| private final boolean fsal Indicator for fsal methods. | |
| maxGrowth | back to summary |
|---|---|
| private double maxGrowth Maximal growth factor for stepsize control. | |
| minReduction | back to summary |
|---|---|
| private double minReduction Minimal reduction factor for stepsize control. | |
| prototype | back to summary |
|---|---|
| private final RungeKuttaStepInterpolator prototype Prototype of the step interpolator. | |
| safety | back to summary |
|---|---|
| private double safety Safety factor for stepsize control. | |
| EmbeddedRungeKuttaIntegrator | back to summary |
|---|---|
| protected EmbeddedRungeKuttaIntegrator(final String name, final boolean fsal, final double[] c, final double[][] a, final double[] b, final RungeKuttaStepInterpolator prototype, final double minStep, final double maxStep, final double scalAbsoluteTolerance, final double scalRelativeTolerance) Build a Runge-Kutta integrator with the given Butcher array.
| |
| EmbeddedRungeKuttaIntegrator | back to summary |
|---|---|
| protected EmbeddedRungeKuttaIntegrator(final String name, final boolean fsal, final double[] c, final double[][] a, final double[] b, final RungeKuttaStepInterpolator prototype, final double minStep, final double maxStep, final double[] vecAbsoluteTolerance, final double[] vecRelativeTolerance) Build a Runge-Kutta integrator with the given Butcher array.
| |
| estimateError | back to summary |
|---|---|
| protected abstract double estimateError(double[][] yDotK, double[] y0, double[] y1, double h) Compute the error ratio.
| |
| getMaxGrowth | back to summary |
|---|---|
| public double getMaxGrowth() Get the maximal growth factor for stepsize control.
| |
| getMinReduction | back to summary |
|---|---|
| public double getMinReduction() Get the minimal reduction factor for stepsize control.
| |
| getOrder | back to summary |
|---|---|
| public abstract int getOrder() Get the order of the method.
| |
| getSafety | back to summary |
|---|---|
| public double getSafety() Get the safety factor for stepsize control.
| |
| integrate | back to summary |
|---|---|
| public void integrate(final ExpandableStatefulODE equations, final double t) throws NumberIsTooSmallException, DimensionMismatchException, MaxCountExceededException, NoBracketingException Implements abstract org. Doc from org. Integrate a set of differential equations up to the given time. This method solves an Initial Value Problem (IVP). The set of differential equations is composed of a main set, which can be extended by some sets of secondary equations. The set of equations must be already set up with initial time and partial states. At integration completion, the final time and partial states will be available in the same object. Since this method stores some internal state variables made
available in its public interface during integration (
| |
| setMaxGrowth | back to summary |
|---|---|
| public void setMaxGrowth(final double maxGrowth) Set the maximal growth factor for stepsize control.
| |
| setMinReduction | back to summary |
|---|---|
| public void setMinReduction(final double minReduction) Set the minimal reduction factor for stepsize control.
| |
| setSafety | back to summary |
|---|---|
| public void setSafety(final double safety) Set the safety factor for stepsize control.
| |