Repository navigation
CFDCraft v0.3
| Version | Stage | Highlights |
|---|---|---|
| 0.3 (2026-11-14) | 3 Pressure solver | Pressure linear solver: smoothed-aggregation algebraic multigrid as the preconditioner of CG (Vaněk, Mandel, Brezina 1996), symmetric V-cycle with Chebyshev or Jacobi smoothing, float32 hierarchy with float64 Krylov iteration (mixed precision, D37), one kernel source for the CPU and the NVIDIA GPU, optional hypre 3.2.1 reference (BoomerAMG-PCG, built from source). 10–13 iterations from 512 to 274 625 cells on all mesh types; same solution as hypre to 1.6e-9; on a Tesla T4 6.5 ns per cell and iteration against 10.5 for hypre at 912 673 cells, all GPU results bitwise equal to the CPU. New command cfdcraft poisson, four Poisson case files, gallery 10–11, recipes 15–17 |
0.3 (2026-11-14) – stage 3: pressure solver
New module cfdcraft-fv::amg, kernel bodies cfdcraft-kernels::amg (one
source for the CPU and the GPU, float32 and float64) and the command
cfdcraft poisson:
- Smoothed-aggregation multigrid (D35). Strength of connection,
three-phase greedy aggregation in the cell order, filtered and
Jacobi-smoothed prolongator, Galerkin coarse operators, explicit
restriction (gather, no atomics), dense coarsest level; deterministic host
setup in float64. Plain aggregation as an option. - Symmetric V-cycle with a Chebyshev (default) or damped Jacobi smoother
in D⁻¹A, λ_max from a fixed power iteration. - Mixed precision (D37). The hierarchy (including a float32 copy of the
fine matrix) in float32, CG in float64;precision = "double"for
comparison. R10 allows f32 only in the multigrid kernels and rejects
contracted, approximate and flush-to-zero f32 arithmetic. - Flexible CG (Notay 2000).
[solver] linear_solver = "cg"and
preconditioner = "amg"incfdcraft scalar(also AMG with BiCGStab);
the report shows the linear iterations and the multigrid setup time. - GPU. PTX entries
amg_*_f32,amg_*_f64,blas_axpy,blas_xpby;
the CUDA backend runs the V-cycle with all vectors resident. - hypre reference (D20). Cargo feature
hypre: a C shim over hypre's
public interface (BoomerAMG with PCG),tools/build_hypre.shbuilds hypre
from source (CPU or CUDA); a CI job builds it and compares. cfdcraft poisson. Mesh sweeps with several solvers and backends;
report of iterations, setup and solve times, ns per cell and iteration,
hierarchy, differences to hypre, bitwise comparison across backends;
checks of iteration growth and agreement.- Verification. Stage-3 tests (iterations nearly independent of the
mesh size on all mesh types, mixed precision equals float64,
SPD V-cycle, bitwise reproducibility, agreement with hypre), five Poisson
case files and one scalar case, gallery 10–11, recipes 15–17, the
explanation pagedocs/verification/stage3.md,tools/stage3_colab.ipynb.