This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Computation of L*M^(-1)*L

Tags: None
(comma "," separated)
degiorgis
Registered Member
Posts
1
Karma
0

Computation of L*M^(-1)*L

Tue Oct 02, 2012 2:57 pm
Hi everybody,

I'm well aware that there are many topics on this, but I still can't find help for my task, so..

What I'm trying to do is to compute L*M^(-1)*L, where L and M are two Sparse N*N matrices.

N is very big (many thousands) and I can't compute explicitly the inverse of M so I should try another method, i tried to get a decomposition of M through a solver and then solve it for L, like this:

SimplicialCholesky<SparseMatrix<double> > chol(M);
A=chol.solve(L);
A=L*A;

but after the second instruction it seems that A is an empty matrix (or at least is what I thought after seeing that is .outerSize() value is 0), while I'm totally sure that neither M or L are empty.

What am I doing wrong? Thanks
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS

Re: Computation of L*M^(-1)*L

Wed Oct 03, 2012 8:02 pm
hm, this should do the job. you can everything went well by checking chol.info()==Success before solving. Compiling without -DNDEBUG might help too to detect errors in your code.


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Yahoo [Bot]