[SciPy-user] Tridiagonal solver extensive use

Ganesh V ganesh.iitm at gmail.com
Thu Nov 9 12:00:25 EST 2006


Hi!

  I have a specific problem (actually fluid mechanics.. solving 2 species
and 1 energy eqn for those concerned !!!) where I'll have to solve around 8
eqns of the type

               Ax =b where A is tridiagonal

 PER TIME STEP to get the various derivatives.. And I may have to solve for
a million time steps or so (pretty small.. of the order of microseconds). I
was planning to use Scipy.lianalg.solve_banded for this purpose. How do I
optimize storing these arrays if all/most of the diagonal/off diagonal terms
are the same. I guess this comes in many places esp.. wherever Finite
differencing is used. In my case, most of the Diagonal terms are one (except
the first 2 and last 2) and same is the case with the off diagonal terms as
well.

Now comes the main question. Do I really go for doing this in Fortran or
make my life easier by writing it in Python- Scipy. Actually I may finish
writing the code pretty soon if it were in Python.. some 50-60 lines..!! ,
but my only worry is performance !! Once the code is written I'll want
results fast (I guess everybody does !!). Will I really gain by coding in
Fortran (actually my programming skills aren't that great, so that may
offset the benefit as well) ??

bye !!

ganesh

-- 
Ganesh V
Undergraduate student,
Department of Aerospace Engineering,
IIT Madras, Chennai-36.

My homepage -->  http://www.ae.iitm.ac.in/~ae03b007

My blog --> http://gantech.wordpress.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.scipy.org/pipermail/scipy-user/attachments/20061109/02b38ef9/attachment.html>


More information about the SciPy-User mailing list