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§
- Sparse
Eigen Config - Configuration for the unified sparse eigenvalue solver.
- Sparse
Eigen Result - Unified eigenvalue decomposition result.
Enums§
- Eigen
Method - Which eigenvalue algorithm to use.
- Eigenvalue
Target - Which eigenvalues to compute.
- Spectral
Transform - 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.