Expand description
The sparse linear algebra under gridoxide’s solvers.
Every Newton loop in gridoxide factors a real sparse system whose pattern is
fixed and whose values change every iteration. sparse::LinearSolver is
that contract, and each backend here implements it:
sparse::RealSparseSystem, onfaer— the default;klu_native::KluNativeSystem, a pure-Rust port of SuiteSparse KLU;sparse_klu::KluRealSystem, the vendored KLU over FFI (featureklu);sparse_pardiso::PardisoRealSystem, oneMKL PARDISO (featurepardiso).
lu::SparseLu picks one of them at run time. block_sparse is the
2×2-block LU power flow’s Block backend uses, and sparse also holds
the complex and fully-fixed factorizations the linear methods need.
Modules§
- block_
sparse - Experimental block-per-bus sparse LU backend for symmetric power flow, mirroring power-grid-model’s approach of grouping each bus’s own unknowns (angle, voltage magnitude) into one dense 2×2 block instead of two separate scalar unknowns scattered across the Jacobian.
- klu_
native - A from-scratch Rust port of the vendored SuiteSparse KLU solver
(
vendor/suitesparse/{BTF,AMD,KLU}/, v7.12.2 — seevendor/suitesparse/PROVENANCE.mdfor the upstream tag/commit this was ported from) — a fourth, always-builtJacobianBackendalongsideScalar,Block, and the FFI-backedKlu(sparse_klu.rs). - lu
- The sparse LU backend, chosen at run time.
- sparse
- Thin internal wrapper around
faer’s sparse LU, isolating gridoxide’s power-flow math from the specific sparse-solver backend. Both a general (non-symmetric, since phase-shifting transformers make the admittance matrix non-Hermitian) complex solve and a real solve are provided, since Newton-Raphson needs the latter for its Jacobian and the linear initial-guess warm start needs the former for the Y-bus.