Skip to main content

Module vecops

Module vecops 

Source
Expand description

Dense BLAS-1 vector primitives for the Krylov solvers.

Pure-Rust replacements for the handful of level-1 BLAS operations the iterative solvers need. All operands are dimensionless &[f64] slices whose length equals the number of unknowns (mesh cells); no uom typing is applied here because a Krylov subspace mixes residuals, search directions, and solution increments that share no single physical dimension.

Every function is O(n) in the slice length and allocation-free (results are either scalars or written in place), so they are safe to call inside the innermost solver loops.

Functions§

axpy
AXPY update y := alpha · x + y, in place.
dot
Euclidean inner product Σ_i a_i · b_i (dimensionless).
nrm2
Euclidean 2-norm sqrt(Σ_i x_i²) (dimensionless, always >= 0).
scal
Scale x := alpha · x, in place.