Registered Member
|
Dear eigen,
I would like to solve a linear system with a sparse Hermitian (complex and self-adjoint) indefinite matrix. According to [Davis], I should use LDLT, but in Eigen's documentation, ( http://eigen.tuxfamily.org/dox/group__T ... stems.html ), all LDLT methods require the matrix to be "SPD" (symmetric + pos. definite), while my matrix is indefinite (and Hermitian). Is it correct to say that if I want to use Eigen to solve my sparse system, I can only use SparseLU, which does not exploit the Hermitianness, or am I missing something? BTW, in the source code of the "spbenchsolver.h" [line 386], there is a comment that says that "Hermitian-and-not-necessarily-positive-definite" matrices are supported...which seems to be inconsistent with the documentation... best, Niek [Davis] Timothy Davis - Direct Methods for Sparse Linear Systems - siam |
Moderator
|
The documentation is indeed too pessimistic as the current SimplicialLDLT does work on a large variety of indefinite problems (make sure you use the lastest Eigen version), so you might give it a try. It will break only if your problem is not full-rank,
|
Registered Member
|
Hi ggael,
Thanks for the information. Is it also the case for Eigen::LDLT? Does it mean that I can use LDLT on symmetric indefinite matrices as long as I guarantee that the matrix is not singular? Thanks. |
Moderator
|
Yes, that's right for LDLT too which is even more stable because it is doing numerical pivoting.
Edit: I've been a bit too fast maybe. LDLT does not work on any invertible matrices, a typical example is: 0 1 1 0 as symmetric pivoting does not help in this case. Some variants of LDLT compute a 2x2 block diagonal to handle such situations, but that's not the case for the current LDLT class. |
Registered Member
|
Registered users: Bing [Bot], Google [Bot], q.ignora, watchstar