[SciPy-user] Runge-Kutta ODE integrator in SciPy, odepack problems on SciPy Superpack for OSX?

Zane Selvans zane at ideotrope.org
Thu Mar 13 19:07:37 EDT 2008


Gabriel Gellner wrote:
> On Wed, Mar 12, 2008 at 08:07:27PM -0700, Zane Selvans wrote:
>> I'm looking for a Python Runge-Kutta diffeq integrator, and I've found 
>> conflicting information online as to whether this is included within SciPy 
>> (the SciPy to Matlab comparison says it's included in Matlab, and not in 
>> SciPy, but some mailing list commentary says it's part of the odepack).
>>
> Odepack is the name of the fortran code that the scipy odeint wraps. It is a
> addaptive linear multistep algroithm and not in the runge kutta familiy. It
> works well, and depending on your problem can be very efficient. Is there any
> reason you need runge kutta specifically? 

The only reason I ask about Runge-Kutta specifically is I know two 
people who have the solution to my problem coded up already, one in 
Fortran, and one in C, and they both used a Runge-Kutta integrator.  I 
want to open-source my model code, but it depends on their codes, and if 
I can't get them to let me publicize their work, I'm going to have to 
re-write it from scratch... unless someone else has already done it.

I don't know if it will help, but the code is calculating displacements 
within a radially symmetric viscoelastic body due to a time-variable 
perturbation to the gravitational potential, so the equations that are 
coupled are the equations of motion in a continuous viscoelastic medium, 
and the equations that determine the gravitational potential.

I don't know why they would have both chosen to write their own 
numerical solutions from scratch if something publicly available would 
have worked... but I guess it's possible.  A lot of people don't seem to 
like to build on the work of others.

> I don't have a mac . . . but can you do:
> import scipy.integrate.odeint
> What does scipy.test() do, looks like a broken installation.

No, I get the same errors when I try that import.  It's a problem with 
the gfortran library that was installed (v3 instead of v2), so yeah, 
broken install.  scipy.test() also fails miserably - it can't import the 
"nose" package.

I went with the binary "superpack" (.egg) because every time I've 
previously tried to get all of the various prerequisites installed and 
playing nice, it's turned into some kind of nightmare and I've given up 
altogether... and this seemed to "just work" (graphical interface and 
all).  Alas, it's bleeding edge SVN nightly builds, and so probably 
pretty unreliable.

Installing under Fink it's impossible to get graphics working so far as 
I can tell, and the main thing I want to do is use Matplotlib and 
basemap for model visualization.

I really (really) wish there was some semi-official, and well tested, OS 
X package that just included everything I could possibly want for doing 
analysis and visualization with Python.  :(

Zane

-- 
Zane Selvans
Amateur Human
zane at ideotrope.org
303/815-6866
PGP Key: 55E0815F
-------------- next part --------------
A non-text attachment was scrubbed...
Name: zane.vcf
Type: text/x-vcard
Size: 254 bytes
Desc: not available
URL: <http://mail.scipy.org/pipermail/scipy-user/attachments/20080313/ed8eb2b3/attachment.vcf>


More information about the SciPy-User mailing list