[SciPy-user] Solving Two boundary value problems with Python/Scipy

A. M. Archibald peridot.faceted at gmail.com
Fri Oct 6 15:20:55 CDT 2006


On 06/10/06, Robert Clewley <rclewley at cam.cornell.edu> wrote:
> > It seems to me it would be useful for scipy to have an "odetools"
> > package, providing convenience features on top of our existing ODE
> > solvers (as well as a better fortran ODE solver, namely lsodar, but
> > that's beside the point).
>
> Sure, and I've said before that the SciPy powers-that-be are welcome to
> use any parts of our PyDSTool package as the basis of such a package.
> e.g., our SWIG-based interfaces to two great integrators (Dopri and
> Radau). Our interface includes events at the C-level and external inputs
> interpolated from arrays. Our ODEGenerator classes provide a lot of
> convenience features on top of the solvers (including the existing Scipy
> VODE solver).

I confess I hadn't really examined PyDSTool very closely; it sounds
like it addresses exactly what I was suggesting. Perhaps there's no
need for such a scipy package, if people can just use PyDSTool. Do you
think there is any point in moving some generic functionality into
scipy? I'd at least like to have an ODE solver that can handle
constraints on the dependent variable.

> > * class ODESolution, which provides an interpolated function object
>
> That's exactly what our Variable and Trajectory classes do, built over
> scipy's interp1d.

Wait, interp1d is linear-interpolation-only! I had in mind a
higher-order spline that took into account not the bending energy at
each knot but the known derivatives at each point (and possibly the
order used internally by the integrator) to obtain a solution that
followed the real solution even more closely at little extra cost.

> > * An implementation (necessarily slow and limited) of the finite
> > difference method
>
> Our diff function provides that with various options for
> functions from R^N -> R^M. Here's the signature and docstring
> from PyDSTool/common.py:

Er, I suppose I meant the relaxation method of solving boundary-value problems.

> A set of phase plane tools, like finding nullclines, fixed points,
> stability.... I have a whole bunch of code working for this
> that will end up in the next release of PyDSTool (for Scipy 0.5.1,
> finally) and I'll be adding a few additional features like calculating
> stability of fixed points.

These more advanced applications, particularly if you've got code in
progress, maybe do belong in PyDSTool; I had in mind just some
relatively basic things (that I have needed).

> The port to Numpy and new Scipy is will be done in the next few weeks so
> code will be available for people to clean up to their liking for use in
> SciPy.

I'll take a closer look at what PyDSTool can do.

Thanks, and I apologize for not having taken a closer look at it
before making my suggestions,

A. M. Archibald


More information about the SciPy-user mailing list