Skip to main content

Module dense

Module dense 

Source
Expand description

Small dense matrix algebra shared by every conductor sized calculation: the series impedance inverses of lines and transformers, the potential coefficient inverses of overhead geometry, and Kron reduction. The kernel is [powerio_core::dense], the one dense elimination; this module re-exports it.

Enums§

DensePivot
The pivot order of invert_dense_matrix’s elimination.

Traits§

DenseScalar
A scalar invert_dense_matrix works over: real (f64) or complex (Complex64).

Functions§

invert_dense_matrix
The inverse of a small dense square matrix by Gauss-Jordan elimination in the pivot order (DensePivot). None when a pivot’s magnitude is NaN, infinite (under DensePivot::Partial; under DensePivot::OpenDssDiagonal an infinite unscaled magnitude is a pivot), singular_pivot or smaller, or relative_pivot times the largest original magnitude in its column or smaller. Each caller states the pivot its quantity is singular at: an absolute singular_pivot (ohms for a series impedance, a dimensionless coefficient for a potential matrix) and a relative_pivot that measures cancellation within a column against that column’s own scale (the dense PTDF fallback passes n ε, so a column eliminated to rounding noise is singular while a wide but valid spread of magnitudes stays invertible). Zero for both refuses only exact singularity. A one by one matrix inverts as its scaled reciprocal (DenseScalar::reciprocal). An empty matrix inverts to an empty matrix.