[eigen] Sparse non-SPD symmetric solving

[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]


Hi,

I want to solve a symmetric, non-definite positive sparse linear
system.  My input is a matrix whose values are stored into the upper
part.

I wonder if the following is the best way to solve the system.  I am
concerned about my handling of the symmetric matrix: should I use the
adjoint view or try to build an adjoint matrix from the beginning?

Eigen::SparseMatrix<double> A;
A.setFromTriplets(...);

Eigen::SparseLU<Eigen::SparseMatrix<double>> solver;

solver.isSymmetric(true);
solver.compute(A.selfadjointView(Eigen::Upper)).solve(b);

Thanks,

-- 
Alberto



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/