Registered Member
|
I can't get the sparse linearsolver to work robustly...
my matrix/vector are: Eigen::SparseMatrix<double> m1(150,150); Eigen::VectorXd vecEig(150); I tried: Eigen::SimplicialLLT<Eigen::SparseMatrix<double> > solver(m1); Eigen::VectorXd resultEig2 = solver.compute(m1); but over time it introduces a small error that explodes over 30 iterations of some algorithm. If i convert it to a dense matrix it works fine: Eigen::MatrixXd dummy(m1); Eigen::LLT<Eigen::MatrixXd> solver2(dummy); Eigen::VectorXd resultEig = solver2.solve(vecEig); For debuging i tried initializing SimplicialLLT before using the dense solver... Eigen::SimplicialLLT<Eigen::SparseMatrix<double> > solver; Eigen::MatrixXd dummy(m1); Eigen::LLT<Eigen::MatrixXd> solver2(dummy); Eigen::VectorXd resultEig = solver2.solve(vecEig); When I run this code I get exactly the same result as for the sparse solver which seem pretty strange to me... Is there some initialization this line breaks? : Eigen::SimplicialLLT<Eigen::SparseMatrix<double> > solver; and is it easy to fix, so I can get proper (and faster) results with the sparse solver? |
Moderator
|
hm, this looks very strange to me as Eigen::SimplicialLLT<Eigen::SparseMatrix<double> > solver; is doing nothing. Which compiler are you using? Do you have some fast-math mode enabled?
|
Registered Member
|
hmm, I guess your right...
at least after a computer restart I am getting the same results with LLT and SimplicialLLT. So I guess it was some temporary error in my build files. |
Registered users: Bing [Bot], blue_bullet, Google [Bot], rockscient, Yahoo [Bot]