[SciPy-User] SciPy ODE integrator
Wed Jul 28 09:45:59 CDT 2010
On 26 July 2010 12:46, David Pine <email@example.com> wrote:
> Is there a SciPy ODE integrator that does adaptive stepsize integration AND produces output with the adaptive time steps intact?
It is not obvious, but the object-oriented integrator, based on VODE,
can be run in this mode. You normally tell it how much to advance on
each call and it does as many adaptive steps as it takes to get there,
but there is an optional argument you can pass it that will make it
take just one step of the underlying integrator. You can then write a
python loop to produce the solution you want.
If this seems messy, I have to agree. scipy's ODE integrators are in
desperate need of an API redesign (they've had one already, which is
why there are two completely different interfaces, but they need
another). You could try pydstool, which is designed for the study of
dynamical systems and has many more tools for working with ODEs and
> The standard SciPy ODE integrator seems to be scipy.integrate.odeint and its simpler cousin scipy.integrate.ode. These work just fine but both take a user-specified time series and returns the solution at those points only. Often, I prefer to have a more classic adaptive stepsize integrator that returns the solution at time steps determined by the integrator (and the degree of desired precision input by the user). This is often the most useful kind of solution because it tends to produce more points where the solution is varying rapidly and fewer where it is not varying much. A classic Runge-Kugga adaptive stepsize ODE solver does this as to many others, but I can't find a nice implementation in SciPy or NumPy. Please advise. Thanks.
> SciPy-User mailing list
More information about the SciPy-User