[SciPy-User] odeint python and mathematica
Wed Feb 10 13:50:35 CST 2010
On Wed, Feb 10, 2010 at 1:10 PM, Nasser Mohieddin Abukhdeir
> while SciPy does not, although it is using compiled FORTRAN modules. Your case is also an extreme one, a system of two ODEs, where I typically deal with systems of 10^3+. The Python overhead is much less of a problem for me since all of the matrix operations are done in C-compiled code. Look into SciPy's Weave functionality, I have not had much success with it and am working on using Cython to speed-up my code and so I can easily interface with external C-code. It might seem like alot of work now, but switching from Matlab to Python (and not C) has benefited me greatly. I think it is well worth the effort, access to VODE through scipy.integrate.ode, excellent 3D plotting using Mayavi, and wrappers exist for the SUNDIALS ODE package if you ever need a matrix-free implicit ODE solver (see PySundials).
Just FYI, if speed is really of the essence, but you still want the
ease of setting up and/or changing the equations easily or adding
fancy functionality (e.g. accurate event detection) without hard
coding stuff yourself in C, my PyDSTool software automatically writes
out C code from your textual specifications and links it to
well-established ODE integrators (Dopri and Radau) on any platform.
This is a very fast way to solve regular, stiff, and implicit ODEs.
You even have the option to delay the final compilation and linking
and make your own bespoke changes to the auto-produced C code so that
you can add special features or tweak the code however you like. So
you get *all* of the speedup from using C code with none of the
hassle, IMHO :) Also, I concur that Mayavi is certainly looking great
as a 3D plotting system.
You'll find more information at pydstool.sourceforge.net. Of course,
the whole environment is built over native python classes and numpy.
More information about the SciPy-User