Sparse matrix equation solver sought

D. Michael McFarland mcfarlan at lomond.caber-eng.com
Mon May 3 19:50:28 EDT 1999


A colleague and I have been playing at...er, writing a simple finite
element code in Python, having great fun saying things like

for elt in Elements:
    Ke = elt.StiffnessMatrix()

We've used the NumPy and LinearAlgebra modules with good results.
(Did I really used to do this stuff in Fortran?)

The time has come to tackle some larger problems, leading to the need
to solve the equation A x = b where A is a real, symmetric matrix of
order N up to 5000 or so.  In simple tests,

  x = LinearAlgebra.solve_linear_equations(A, b)

has eventually ground out an answer, but the time and memory
requirements are prohibitive.

Fortunately, A is sparse, being banded with a few outlying nonzero
elements.  We'd like to capitalize on this, and suspect Somebody Must
Have Done This Before, but we've been unable to find much on the topic
beyond some months-old posts in the matrix-sig archive.  Before I
charge off to reinvent the wheel by trying to interface what we've got
to a C library (which doesn't look too painful, actually), would
someone please tell me where to look for the state of the
sparse-matrix Python art?  (Or, if more appropriate, tell me it ain't
never gonna work in Python and why?)

Best regards,
Michael

Ahh, for the days of rectangular domains and analytical solutions....

--
    D. Michael McFarland   <mcfarlan at caber-eng.com>
    Caber Engineering, Inc., Glastonbury, Connecticut




More information about the Python-list mailing list