Registered Member
|
Hi,
I'm using SimplicialLDLt to solve a sparse linear system, but I'm not getting right results. My code looks like the following excerpt:
I'm converting the sparse matrix to dense and printing it, and the values are fine. What am I doing wrong? |
Moderator
|
How is mat? is it really selfadjoint? does it store all coefficients? only the lower half? only the upper half? Then you should check the success of each step:
solver.compute(mat); if(!solver.info()==Success) {...} x = solver.solve(b); if(!solver.info()==Success) {...} |
Registered Member
|
The test matrix I'm using is the following:
It's being solved fine by Matlab and by a SuperLU routine that I've written some time ago. The solver.info() is ok too. |
Moderator
|
this matrix is not symmetric, so you cannot solve it with a Cholesky factorization.
|
Registered Member
|
Yes, that's right.
Now I'm trying to solve it with the BiCGSTAB method, but I'm getting the following error: In the following line, when I call solver.solve(b):
My code looks like the following:
Thanks a lot, Guilherme. |
Registered users: Bing [Bot], Google [Bot], Yahoo [Bot]