Skip to main content

Module sparse_eigen

Module sparse_eigen 

Source
Expand description

Unified sparse eigenvalue interface

This module provides a single entry point for computing eigenvalues and eigenvectors of large sparse matrices, automatically selecting the best algorithm based on matrix properties.

§Supported Backends

  • LOBPCG: Locally Optimal Block Preconditioned Conjugate Gradient. Best for SPD matrices when the smallest/largest eigenvalues are needed.
  • IRAM: Implicitly Restarted Arnoldi Method. Best for general (non-symmetric) matrices or when interior eigenvalues are needed.
  • Thick-Restart Lanczos: Best for symmetric matrices with moderate dimension Krylov subspace.

§Shift-and-Invert

For computing eigenvalues near a given target sigma, the module provides a shift-and-invert wrapper that transforms the problem so that eigenvalues near sigma become the dominant (largest magnitude) eigenvalues of the shifted-and-inverted operator (A - sigma I)^{-1}.

§Spectral Transformations

  • Standard: Compute eigenvalues of A directly
  • Shift-Invert: Compute eigenvalues of (A - sigma I)^{-1}
  • Buckling: Compute eigenvalues of (K - sigma KG)^{-1} K
  • Cayley: Compute eigenvalues of (A - sigma I)^{-1}(A + sigma I)

§References

  • Lehoucq, R.B., Sorensen, D.C., & Yang, C. (1998). “ARPACK Users’ Guide”. SIAM.
  • Knyazev, A.V. (2001). “Toward the optimal preconditioned eigensolver: LOBPCG”. SIAM J. Sci. Comput.

Structs§

SparseEigenConfig
Configuration for the unified sparse eigenvalue solver.
SparseEigenResult
Unified eigenvalue decomposition result.

Enums§

EigenMethod
Which eigenvalue algorithm to use.
EigenvalueTarget
Which eigenvalues to compute.
SpectralTransform
Spectral transformation to apply.

Functions§

cayley_transform_matvec
Apply Cayley transformation: (A - sigma I)^{-1} * (A + sigma I) * v.
check_eigenpairs
Check if all eigenpairs satisfy the residual tolerance.
compute_residuals
Compute residual norms ||A*v_i - lambda_i * v_i|| for each eigenpair.
shift_invert_eig
Compute eigenvalues nearest to sigma using shift-and-invert.
sparse_eig
Compute eigenvalues and eigenvectors of a sparse matrix.
sparse_eigs
Convenience function: compute eigenvalues of a general (possibly non-symmetric) matrix.
sparse_eigsh
Convenience function: compute eigenvalues of a symmetric matrix.