Continuous system simulation in Python

Robert Kern robert.kern at gmail.com
Fri Oct 7 09:05:34 EDT 2005


François Pinard wrote:
> [Robert Kern]
> 
>>[...] an ODE integrator would probably want to adaptively select its
>>timesteps as opposed to laying out a uniform discretization upfront.
> 
> Eons ago, I gave myself such a little beast (but really found in an
> Appendix of a book on simulation), which I use since then whenever I
> need it, not so often in these days.  If you are curious, see:
> 
>   http://fp-etc.progiciels-bpi.ca/rke.html
> 
> yet I'm sure there is just plenty of such things, all around.
> 
> The above is in C, not in Python.  I vaguely remember having once
> rewritten the thing in Python, then discarded the result as not fast
> enough for the need I then had.  If I really needed to use it nowadays,
> I'll probably try to quickly link it through Pyrex.  Or just look around
> a bit for some already made, and maybe better solution. :-)

scipy has wrapped LSODA and VODE from ODEPACK. There are a few more
integrators in ODEPACK which could easily be wrapped with f2py should
someone feel the urge. We'd probably wrap yours, too, if it weren't
GPLed.  ;-)

-- 
Robert Kern
rkern at ucsd.edu

"In the fields of hell where the grass grows high
 Are the graves of dreams allowed to die."
  -- Richard Harter




More information about the Python-list mailing list