gridoxide_sparse/lib.rs
1//! The sparse linear algebra under gridoxide's solvers.
2//!
3//! Every Newton loop in gridoxide factors a real sparse system whose pattern is
4//! fixed and whose values change every iteration. [`sparse::LinearSolver`] is
5//! that contract, and each backend here implements it:
6//!
7//! - [`sparse::RealSparseSystem`], on `faer` — the default;
8//! - [`klu_native::KluNativeSystem`], a pure-Rust port of SuiteSparse KLU;
9//! - `sparse_klu::KluRealSystem`, the vendored KLU over FFI (feature `klu`);
10//! - `sparse_pardiso::PardisoRealSystem`, oneMKL PARDISO (feature `pardiso`).
11//!
12//! [`lu::SparseLu`] picks one of them at run time. [`block_sparse`] is the
13//! 2×2-block LU power flow's `Block` backend uses, and [`sparse`] also holds
14//! the complex and fully-fixed factorizations the linear methods need.
15
16pub mod block_sparse;
17pub mod klu_native;
18pub mod lu;
19pub mod sparse;
20#[cfg(feature = "klu")]
21pub mod sparse_klu;
22#[cfg(feature = "pardiso")]
23pub mod sparse_pardiso;