[SciPy-user] FEM

Robert Cimrman cimrman3@ntc.zcu...
Mon Mar 19 05:44:15 CDT 2007

Håkan Jakobsson wrote:
> Hi list,
> Python/scipy newbie here. I'm currently writing my master's thesis in 
> computational mathematics - discontinuous galerkin methods to be 
> precise. I'v been doing all the numerics for my thesis in Matlab but 
> stumbled upon Python and scipy by chance. As a little experiment I 
> translated one of my solvers into Python using numpy, scipy and the 
> pysparse packages, and I was very impressed with the effort/performance 
> ratio. Now, to the point..
> If you're doing finite element analysis, what are you're experiences 
> using Python? Do you use Python as your main development tool? In 
> conjunction with C, Fortran? Is there any drawbacks with using Python 
> for this type of work? Anything else?
> I hope I'm not asking to much here, but it would be really interesting 
> to know a bit about what the situation's like. I think Python and scipy 
> is really great, and now I'm trying to convince everyone else...
> Please, share with me your experiences.

I have switched to Python + scipy + matplotlib + ... combo two years ago
and never regretted that decision. You can see the result at

Before I coded a lot in matlab (a heart simulation FE code, with inverse
problem solution capability), writing critical parts as C mex-files. It
was rather painful comparing to ease of SWIG or f2py or ctypes or (plug
your favourite wrapper generator here). The pass-by-value (all function
arguments are immutable) concept of matlab was one of the main obstacles
to get a decent speed - we had to use dirty tricks to override this.

The combination Python + C (or fortran or...) is a really powerful
concept. Moreover numpy and scipy advances in big paces, so if you miss
something now, there is a great chance you will not miss it in a few


More information about the SciPy-user mailing list