Re: [eigen] Using UmfPackLU with sparse RHS

[ Thread Index | Date Index | More Archives ]

The solve with sparse right hand sides were partly disabled for some reasons.
We have corrected it. It should work now with the devel branch.
Thanks for reporting the issue
changeset:   3391608d6e57
user:        dnuentsa
date:        2013-01-25 18:17:17
summary:     add support for solving with sparse right hand side
affected #:  8 files


On 01/25/2013 11:50 AM, Alain Dequidt wrote:
I try to use Eigen's interface to UmfPack. The documentation claims that UmfPackLU can solve linear equations with a dense or sparse right hand side.

This class allows to solve for A.X = B sparse linear problems via a LU factorization using the UmfPack library.
The sparse matrix A must be squared and full rank.
The vectors or matrices X and B can be either dense or sparse.

However the following code does not compile for me (with g++ 4.6.1 and eigen 3.2.1)
#include <eigen3/Eigen/UmfpackSupport>

int main(){
    Eigen::SparseMatrix<double> M(10,10);
    Eigen::SparseMatrix<double> B(10,10);     // does not compile
    //Eigen::MatrixXd B(10,10);                       // compiles
    Eigen::UmfPackLU<Eigen::SparseMatrix<double> > solver(M);
    return 0;

Is this a bug ? or could you please explain how I should proceed ?
By the way, are sparse matrices convertible to dense ones ?
Alain Dequidt
+33 (0) 4 73 40 71 94

Maître de Conférences
Université Blaise Pascal Clermont II, ICCF
Chimie 7
24 avenue des landais
63171 Aubiere Cedex

Mail converted by MHonArc 2.6.19+