|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.commons.math.ode.AbstractIntegrator
org.apache.commons.math.ode.nonstiff.MultistepIntegrator
org.apache.commons.math.ode.nonstiff.AdamsBashforthIntegrator
public class AdamsBashforthIntegrator
This class implements explicit Adams-Bashforth integrators for Ordinary Differential Equations.
Adams-Bashforth (in fact due to Adams alone) methods are explicit multistep ODE solvers witch fixed stepsize. The value of state vector at step n+1 is a simple combination of the value at step n and of the derivatives at steps n, n-1, n-2 ... Depending on the number k of previous steps one wants to use for computing the next value, different formulas are available:
A k-steps Adams-Bashforth method is of order k. There is no limit to the value of k.
These methods are explicit: fn+1 is not used to compute
yn+1. More accurate implicit Adams methods exist: the
Adams-Moulton methods (which are also due to Adams alone). They are
provided by the AdamsMoultonIntegrator class.
AdamsMoultonIntegrator,
BDFIntegrator,
Serialized Form| Field Summary |
|---|
| Fields inherited from class org.apache.commons.math.ode.nonstiff.MultistepIntegrator |
|---|
previousF, previousT, prototype |
| Fields inherited from class org.apache.commons.math.ode.AbstractIntegrator |
|---|
eventsHandlersManager, stepHandlers, stepSize, stepStart |
| Constructor Summary | |
|---|---|
AdamsBashforthIntegrator(int order,
double step)
Build an Adams-Bashforth integrator with the given order and step size. |
|
| Method Summary | |
|---|---|
double[] |
getCoeffs()
Get the coefficients of the method. |
double |
integrate(FirstOrderDifferentialEquations equations,
double t0,
double[] y0,
double t,
double[] y)
Integrate the differential equations up to the given time. |
| Methods inherited from class org.apache.commons.math.ode.nonstiff.MultistepIntegrator |
|---|
getStarterIntegrator, rotatePreviousSteps, setStarterIntegrator, start |
| Methods inherited from class org.apache.commons.math.ode.AbstractIntegrator |
|---|
addEndTimeChecker, addEventHandler, addStepHandler, clearEventHandlers, clearStepHandlers, getCurrentSignedStepsize, getCurrentStepStart, getEventHandlers, getName, getStepHandlers, requiresDenseOutput, sanityChecks |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AdamsBashforthIntegrator(int order,
double step)
order - order of the method (must be strictly positive)step - integration step size| Method Detail |
|---|
public double integrate(FirstOrderDifferentialEquations equations,
double t0,
double[] y0,
double t,
double[] y)
throws DerivativeException,
IntegratorException
This method solves an Initial Value Problem (IVP).
Since this method stores some internal state variables made
available in its public interface during integration (ODEIntegrator.getCurrentSignedStepsize()), it is not thread-safe.
equations - differential equations to integratet0 - initial timey0 - initial value of the state vector at t0t - target time for the integration
(can be set to a value smaller than t0 for backward integration)y - placeholder where to put the state vector at each successful
step (and hence at the end of integration), can be the same object as y0
EventHandler stops it at some point.
DerivativeException - this exception is propagated to the caller if
the underlying user function triggers one
IntegratorException - if the integrator cannot perform integrationpublic double[] getCoeffs()
The coefficients are the ci terms in the following formula:
yn+1 = yn + h × ∑i=0i=k-1 cifn-i
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||