math-solvers 0.1.5

High-performance linear solvers for BEM and FEM
Documentation

High-performance linear solvers for BEM and FEM

This crate provides a collection of iterative and direct solvers for linear systems, along with sparse matrix representations and preconditioners.

Features

  • Iterative Solvers: GMRES, BiCGSTAB, CGS, CG
  • Direct Solvers: LU decomposition (with BLAS and pure-Rust fallbacks)
  • Preconditioners: Jacobi, ILU, block diagonal
  • Sparse Matrices: CSR format with efficient matrix-vector products
  • Generic Scalar Types: Works with Complex64, Complex32, f64, f32

Example

use solvers::{CsrMatrix, gmres, GmresConfig};
use num_complex::Complex64;

// Create a sparse system matrix
let matrix = CsrMatrix::from_dense(&dense_matrix, 1e-10);

// Solve with GMRES
let config = GmresConfig::default();
let solution = gmres(&matrix, &rhs, &config)?;