Skip to main content

Module dense

Module dense 

Source
Expand description

Small dense matrix algebra: the one dense elimination kernel. The distribution crate’s conductor sized calculations (series impedance inverses of lines and transformers, potential coefficient inverses of overhead geometry, Kron reduction, the OpenDSS primitive check), the dense PTDF fallback and the transmission merge’s zero impedance link flows read it. powerio_dist::dense re-exports it.

Enums§

DensePivot
The pivot order of invert_dense_matrix’s elimination.
DenseRefusal
Why eliminate_dense_matrix refused a matrix.

Traits§

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

Functions§

eliminate_dense_matrix
invert_dense_matrix stating why it refused.
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.