Expand description
HyBIT — Autonomous Hybrid Sparse Solver.
HyBIT 0.6.0 provides a Rust facade for real SPD sparse systems using CSR32 input, PCG, adaptive selective local Cholesky correction, weighted overlapping Schwarz, geometry-aware rigid-body coarse correction for 3-D structural systems, and reusable analyze/prepare/solve-many contexts.
§Example
use hybit::{Csr32Matrix, HybitSolver};
let a = Csr32Matrix::new(
3,
3,
vec![0, 2, 5, 7],
vec![0, 1, 0, 1, 2, 1, 2],
vec![2.0, -1.0, -1.0, 2.0, -1.0, -1.0, 2.0],
)?;
let b = vec![1.0, 0.0, 1.0];
let mut x = vec![0.0; 3];
let solver = HybitSolver::new();
let report = solver.solve_csr32(&a, &b, &mut x)?;
assert!(report.relative_residual < 1.0e-8);The automatic path is currently experimental and restricted to real SPD systems with PCG. See the repository README for current limitations.
Structs§
- Abtm
Config - Abtm
Matrix - Abtm
Stats - Balanced
Rigid Body TwoLevel Block Jacobi Preconditioner - Experimental symmetric balanced two-level structural preconditioner.
- Block
Jacobi Preconditioner - Csr32
Matrix - DofMask
- Hybit
Analysis - Hybit
Prepared Structural System - Hybit
Prepared System - Hybit
Solver - Hybrid
Options - Hybrid
Preconditioner - Identity
Preconditioner - Jacobi
Preconditioner - Krylov
Outcome - Local
Cholesky Region - Matrix
Market Info - Matrix
Profile - Parallel
Csr32 Operator - Read-only parallel CSR operator wrapper. It shares the validated CSR
storage and only changes the row execution policy used by
apply. - Parallel
Rigid Body TwoLevel Preconditioner - Experimental view that parallelizes only the embarrassingly parallel fine/coarse transfer and 3x3 block-Jacobi kernels. The dense coarse triangular solve remains serial. It borrows the already prepared rigid-body preconditioner, so no Cholesky factor is duplicated.
- PcgWorkspace
- Reusable PCG scratch storage. A prepared HyBIT context allocates this once and reuses it across every Krylov iteration and every subsequent RHS.
- Rigid
Body Apply Profile - Rigid
Body TwoLevel Block Jacobi Preconditioner - Solve
Report - Solver
Options - Structural
Options - Tile
Desc - TwoLevel
Block Jacobi Preconditioner
Enums§
- Backend
Policy - Hybit
Error - Matrix
Backend - Matrix
Market Error - Matrix
Market Symmetry - Preconditioner
Kind - Rigid
Body Aggregation - Solve
Status - Solver
Kind - Structural
PcgVector Policy - Execution policy for dense vector kernels inside structural PCG.
- Structural
Preconditioner Policy - Execution policy for the structural rigid-body two-level preconditioner.
- Structural
Spmv Policy - Execution policy for the fine-grid CSR SpMV used by structural PCG.
- Tile
Kind
Constants§
- PARALLEL_
PCG_ VECTOR_ CHUNK - Chunk size used by the experimental parallel PCG vector kernels.
- STRUCTURAL_
PARALLEL_ PCG_ VECTOR_ MIN_ N - Auto threshold for the parallel/fused PCG dense-vector path.
- STRUCTURAL_
PARALLEL_ PCG_ VECTOR_ MIN_ THREADS - r24 showed a 2-worker pool can be slower than serial vector kernels.
- STRUCTURAL_
PARALLEL_ PRECONDITIONER_ MIN_ NNZ - Auto switches to the parallel structural preconditioner after this many nonzeros. The dense coarse triangular solve itself remains serial.
- STRUCTURAL_
PARALLEL_ SPMV_ MIN_ NNZ - Auto switches to parallel CSR after this many nonzeros. Small matrices stay serial because Rayon scheduling overhead dominates there.
- TILE_
WIDTH
Traits§
Functions§
- analyze_
csr32 - parallel_
vector_ worker_ count - Number of workers in the shared Rayon pool used by parallel Krylov kernels.
- pcg
- pcg_
with_ workspace - pcg_
with_ workspace_ parallel_ vectors - Experimental PCG variant whose dense vector kernels use the shared Rayon pool. The sparse operator and preconditioner are unchanged.
- read_
matrix_ market - read_
matrix_ market_ from_ reader - recommend_
rigid_ body_ aggregate_ nodes - Recommend a contiguous aggregate size for the six-mode rigid-body coarse space.
- solve
- write_
matrix_ market_ general