Registered Member
|
Hello,
I'm having some troubles with the conjugate gradient iterative solver. I get the following error:
I really can't figure out what's happening! Here's a sketch of my C++ program:
I would appreciate any kind of help, thanks! Brian. EDIT: I tried the SimplicialLLT solver and I get some other errors. Is it possible that I didn't install correctly the packages ? Errors with SimplicialLLT :
EDIT2: I think I found where the errors come from. Looks like there is a problem with me trying to construct a sparse vector this way:
I replaced it by
and filled it with a for loop (i) and FORCE.coeffRef(i). However it still does not work, is it because the linear solvers do not accept sparse vectors b in Ax = b ? Thanks again. |
Moderator
|
This works in 3.3, but not in 3.2 because the rhs is sparse whereas the result is dense. Better use a dense vector for the RHS anyway.
|
Registered Member
|
Hello, ok thanks for your help.
|
Registered users: Bing [Bot], Evergrowing, Google [Bot], rockscient