Skip to content

“eigs” function doesn’t work for a sparse matrix with one or more zero pivots #135

@k-tamuraphys

Description

@k-tamuraphys

Hi, I am trying to obtain the lowest eigenvalue of a sparse hermitian matrix with one or more zero pivots.
For example, my matrix has the following form:

ham
6×6 SparseMatrixCSC{Float64, Int64} with 10 stored entries:
5.0   ⋅   1.0  -1.0   ⋅     ⋅
   ⋅    ⋅    ⋅     ⋅    ⋅     ⋅
  1.0   ⋅    ⋅     ⋅    ⋅    1.0
 -1.0   ⋅    ⋅     ⋅    ⋅   -1.0
   ⋅    ⋅    ⋅     ⋅    ⋅     ⋅
   ⋅    ⋅   1.0  -1.0   ⋅    5.0

.
When I execute the “eigs” function for the above matrix, I get the following error message:

energy, ψ = eigs(ham, nev=1, which=:SM)
LoadError: ZeroPivotException: factorization encountered one or more zero pivots. Consider switching to a pivoted LU factorization.
ZeroPivotException: factorization encountered one or more zero pivots. Consider switching to a pivoted LU factorization.

According to the massage, it suggest the use of a pivoted LU factorization, can I chose it?
If not, is this designed with a purpose?
It would be nice to have it work for matrices that contain zero pivots.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions