OONumerics User :

From: Gabriel M. Beddingfield (gabriel_at_[hidden])
Date: 2007-03-14 18:43:40


i_inbox_at_[hidden] wrote:
> Hello,
> I would like to know which sparse matrix solver should be used for boost::ublas.

I don't know of any solvers for boost::ublas. There's a similar library
called MTL (matrix template library) that is close coupled with the IML
(iterative matrix library). MTL provides the linear algebra. IML
supplies the solvers (e.g. biconjugate gradient method).

Likewise, I don't know of any dense solver packages that utilize
boost::ublas. Examples and how-to's in their documentation show "how to
use ublas for creating an LU solver...." (i.e. do it yourself).

I found a masters thesis from 2004 where someone else was pondering the
same questions. They found ublas to have better performance than MTL,
so they wrote their own solvers to take advantage of it. Here's a
reference:

http://etd.uwaterloo.ca/etd/kpvorwer2004.pdf

While I haven't looked into it, I wonder if you might be able to use the
ITL directly, or through an adapter class.

http://math.nist.gov/iml++/

This library is based in no small part on "Templates for the Solution of
Linear Systems: Building Blocks for Iterative Methods"
(http://www.netlib.org/linalg/html_templates/report.html).

>
> It must be able to solve linear equations with (sparse) non-symmetric system matrix. A direct solver should be included and
> preordering should be implemented.

According to ublas: "The library covers the usual basic linear algebra
operations on vectors and matrices: reductions like different norms,
addition and subtraction of vectors and matrices and multiplication with
a scalar, inner and outer products of vectors, matrix vector and matrix
matrix products and triangular solver."

Regarding triangular solver(s)... here's an example of implementing
matrix inversion using LU decomposition:

http://www.crystalclearsoftware.com/cgi-bin/boost_wiki/wiki.pl?LU_Matrix_Inversion

Also, it's often possible for many of these templated matrix libraries
have a back-end that you can feed to LAPACK for dense solvers. Here's a
link to a site that provides bindings for such a thing:

http://news.tiker.net/software/boost-bindings

Hope this helps!

-Gabriel