org.apache.commons.math3.ode.nonstiff
public abstract class RungeKuttaIntegrator extends AbstractIntegrator
These methods are explicit Runge-Kutta methods, their Butcher arrays are as follows :
0 | c2 | a21 c3 | a31 a32 ... | ... cs | as1 as2 ... ass-1 |-------------------------- | b1 b2 ... bs-1 bs
EulerIntegrator
,
ClassicalRungeKuttaIntegrator
,
GillIntegrator
,
MidpointIntegrator
Modifier and Type | Field and Description |
---|---|
private double[][] |
a
Internal weights from Butcher array (without the first empty row).
|
private double[] |
b
External weights for the high order method from Butcher array.
|
private double[] |
c
Time steps from Butcher array (without the first zero).
|
private RungeKuttaStepInterpolator |
prototype
Prototype of the step interpolator.
|
private double |
step
Integration step.
|
isLastStep, resetOccurred, stepHandlers, stepSize, stepStart
Modifier | Constructor and Description |
---|---|
protected |
RungeKuttaIntegrator(java.lang.String name,
double[] c,
double[][] a,
double[] b,
RungeKuttaStepInterpolator prototype,
double step)
Simple constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
integrate(ExpandableStatefulODE equations,
double t)
Integrate a set of differential equations up to the given time.
|
acceptStep, addEventHandler, addEventHandler, addStepHandler, clearEventHandlers, clearStepHandlers, computeDerivatives, getCurrentSignedStepsize, getCurrentStepStart, getEvaluations, getEventHandlers, getMaxEvaluations, getName, getStepHandlers, initIntegration, integrate, sanityChecks, setEquations, setMaxEvaluations, setStateInitialized
private final double[] c
private final double[][] a
private final double[] b
private final RungeKuttaStepInterpolator prototype
private final double step
protected RungeKuttaIntegrator(java.lang.String name, double[] c, double[][] a, double[] b, RungeKuttaStepInterpolator prototype, double step)
name
- name of the methodc
- time steps from Butcher array (without the first zero)a
- internal weights from Butcher array (without the first empty row)b
- propagation weights for the high order method from Butcher arrayprototype
- prototype of the step interpolator to usestep
- integration steppublic void integrate(ExpandableStatefulODE equations, double t) throws NumberIsTooSmallException, DimensionMismatchException, MaxCountExceededException, NoBracketingException
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 (AbstractIntegrator.getCurrentSignedStepsize()
), it is not thread-safe.
integrate
in class AbstractIntegrator
equations
- complete set of differential equations to integratet
- target time for the integration
(can be set to a value smaller than t0
for backward integration)NumberIsTooSmallException
- if integration step is too smallDimensionMismatchException
- if the dimension of the complete state does not
match the complete equations sets dimensionMaxCountExceededException
- if the number of functions evaluations is exceededNoBracketingException
- if the location of an event cannot be bracketedCopyright (c) 2003-2013 Apache Software Foundation