Solving Partial Differential equation in Python

Jive Dadson jdadson at
Tue Nov 6 00:22:04 CET 2001

Calvin wrote:
> Greetings,
>         Did anyone have the experience in solving a PDE numerically in Python.
> The PDE is a Euler-Lagrange equation. In fact it is a simulation of LCD
> modeling. I search the web and find many libraries like Numeric Python.
> But I cannot find any library aim at solving PDE. So I think I have to
> design my own Algorithm. Could anyone help me.
> -Calvin

As a last resort, you might look into _Numerical Recipes in C_ by Press
et al.  If you find something there that appears to do what you want,
you could write a Python extension module for it.

There are many pitfalls to working with the NRC code.  It subscripts
arrays and variables from 1, not 0.  (Many functions are more or less
direct translations from Fortran.)  It uses floats rather than doubles
too much.  Termination criteria for iterative procedures are often
seriously botched.  Sometimes the codes are not anywhere close to
state-of-the-art.  But it is available, and more or less free.

See, chapter 19.


More information about the Python-list mailing list