neco-eigensolve
Sparse generalized eigenvalue solvers for vibration modes, resonances, and other selected eigenpairs in large sparse systems.
A Japanese mathematical note is available in MATH-ja.md.
Solvers
neco-eigensolve has two solvers for
$$K\mathbf{x} = \lambda M\mathbf{x}$$
where K and M are sparse symmetric matrices.
lobpcgcomputes the smallest eigenpairs and is suited to modal analysis or graph-like problems.feast_solve_intervalextracts all eigenpairs inside a spectral interval.
LOBPCG uses a Rayleigh-quotient iteration with a preconditioned search space. FEAST builds a filtered subspace by contour integration. Algorithm details and limits are summarized in the Japanese note MATH-ja.md.
feast_solve_interval is the main FEAST entry point. By default it uses the iterative path and returns Err on invalid configuration, failed contour-point solves, or non-convergence within max_loops.
The optional direct LU path is still for comparison and validation. Current tests cover diagonal problems, tridiagonal and other banded systems, permutation-similar cases, mismatched K / M sparsity patterns, bounded row-pivot cases, and shift-regularized cases.
Its limits are narrower than the default path. The internal LU backend uses bounded row-only pivoting, keeps the symbolic pattern unchanged after pivoting, and returns Err when a stable pivot lies outside the pivot window or when the interval is too small to provide enough contour-shift regularization.
The crate also includes Craig-Bampton component-mode synthesis, IC(0) preconditioning, and CheFSI utilities for polynomial filtering.
Usage
LOBPCG for the smallest modes
use ;
use CsrMat;
let k_mat: = /* ... */;
let m_mat: = /* ... */;
let precond = new;
let result: LobpcgResult = lobpcg;
println!;
println!;
println!;
FEAST for an interval
use ;
use CsrMat;
let k_mat: = /* ... */;
let m_mat: = /* ... */;
let interval = FeastInterval ;
let config = FeastConfig ;
let result = feast_solve_interval.unwrap;
println!;
Progress callbacks
use ;
let _lobpcg = lobpcg_with_progress;
let mut on_progress = ;
let _feast = feast_solve_interval.unwrap;
API
| Item | Description |
|---|---|
lobpcg(K, M, n_modes, tol, max_iter, precond) |
Solve for the smallest eigenpairs and return LobpcgResult |
lobpcg_with_progress(...) |
Same solver with an FnMut(usize, usize) progress callback |
lobpcg_configured(K, M, config, precond) |
LOBPCG entry point with explicit LobpcgConfig |
LobpcgConfig |
Controls mode count, tolerance, iteration count, and DC deflation |
JacobiPreconditioner::new(&K) |
Build a diagonal preconditioner from K |
Ic0Preconditioner::new(&K, m_diag) |
Validate the input pattern and build an incomplete Cholesky preconditioner, where m_diag is Option<&[f64]> |
cms::craig_bampton_reduce(K, M, boundary_dofs, n_interior_modes) |
Reduce a substructure with Craig-Bampton component-mode synthesis |
cms::couple_cb_systems(a, b, interface_pairs) |
Couple two reduced Craig-Bampton systems across a shared interface |
DenseMatrix |
Lightweight column-major dense matrix used in public results and preconditioner blocks |
chefsi::lump_mass(&M) |
Build a lumped mass diagonal for CheFSI-style polynomial filtering |
chefsi::random_subspace_with_seed(n, m, seed) |
Build a deterministic initial CheFSI subspace from an explicit seed |
chefsi::filter::apply_chebyshev_filter(...) |
Apply the low-pass Chebyshev filter on an abstract implementation |
chefsi::rayleigh_ritz::rayleigh_ritz(...) |
Extract Ritz pairs from a filtered subspace |
Preconditioner |
Trait for custom residual preconditioners on DenseMatrix residual blocks |
LobpcgResult |
Returned eigenvalues, DenseMatrix eigenvectors, and iteration count |
feast_solve_interval(K, M, interval, config, on_progress) |
Solve for eigenpairs inside an interval with the default GMRES implementation |
FeastConfig |
Controls subspace size, quadrature count, tolerance, loops, and seed |
FeastInterval |
Spectral interval [lambda_min, lambda_max] |
FeastIterationInfo |
Progress information passed to the FEAST callback |
FeastIntervalResult |
Returned eigenvalues, eigenvectors, and residuals |
Optional features
| Feature | Description |
|---|---|
parallel |
Enables rayon-based parallel evaluation of FEAST contour points |
faer-lu |
Enables optional direct LU support for FEAST comparison and validation |
License
MIT