public class OdeRungeKutta extends ODE
OdeRungeKutta finds an approximation to the solution
of a system of first-order differential equations of the form
with given initial data. The class
attempts to keep the global error proportional to a user-specified tolerance.
This class is efficient for nonstiff systems where the derivative
evaluations are not expensive.
OdeRungeKutta is based on a code designed by Hull, Enright
and Jackson (1976, 1977). It uses Runge-Kutta formulas of order five and
six developed by J. H. Verner.
|Modifier and Type||Class and Description|
The iteration did not converge within the maximum number of steps allowed (default 500).
Public interface for user supplied function to
Tolerance is too small or the problem is stiff.
|Constructor and Description|
Constructs an ODE solver to solve the initial value problem dy/dt = f(t,y)
|Modifier and Type||Method and Description|
Sets the maximum internal step size.
Integrates the ODE system from
examineStep, getFloor, getInitialStepsize, getMaximumStepsize, getMaxSteps, getMinimumStepsize, getNorm, getScale, getTolerance, setFloor, setInitialStepsize, setMaxSteps, setMinimumStepsize, setNorm, setScale, setTolerance, vnorm
public OdeRungeKutta(OdeRungeKutta.Function function)
function- implementation of interface Function that defines the right-hand side function f(t,y)
public void setMaximumStepsize(double stepsize)
public void solve(double t, double tEnd, double y) throws OdeRungeKutta.ToleranceTooSmallException, OdeRungeKutta.DidNotConvergeException
tEnd. On all but the first call to solve, the value of
tmust equal the value of
tEndfrom the previous call.
doublespecifying the independent variable
doublespecifying the value of
tat which the solution is desired
y- on input,
doublearray containing the initial values. On output,
doublearray containing the approximate solution.
OdeRungeKutta.DidNotConvergeException- is thrown if the number of internal steps exceeds maxSteps (default 500). This can be an indication that the ODE system is stiff. This exception can also be thrown if the error tolerance condition could not be met.
OdeRungeKutta.ToleranceTooSmallException- is thrown if the computation does not converge on some step.
Copyright © 1970-2015 Rogue Wave Software
Built October 13 2015.