Expand description
Fixed-point 8.24 bit-exact hydraulic pipe solver, 6-species stratigraphic erosion, Lagrangian droplet erosion, and meandering channel carving.
Tier-1 HotZeroHeap: zero heap allocations in all simulation loops. All grid
state is passed as caller-supplied slices. Bit-exact integer arithmetic guarantees
identical results across x86_64, ARM64, and WASM.
Structs§
- Coupled
Erosion Params - Parameters for coupled 6-species stratigraphic erosion.
- Strata
Cell6 - 6-species stratigraphic column with water and suspended sediment.
Constants§
- FIXED_
8_ 24_ SCALE - Scale factor for 8.24 fixed-point integer representations (2^24 = 16,777,216).
Functions§
- carve_
meander_ channel - Carves an asymmetric meandering river cross-section (outer cutbank / inner point bar) along a polyline.
- f32_
to_ fixed824 - Converts an
f32value to 8.24 fixed-point format (i64). - fixed824_
to_ f32 - Converts an 8.24 fixed-point format (
i64) tof32. - step_
coupled_ 6species_ erosion - Evaluates a coupled 6-species stratigraphic hydraulic erosion step.
- step_
hydraulic_ pipe_ fixed824 - Executes a single bit-exact 8.24 fixed-point virtual-pipe hydraulic step. Conserves bedrock + sediment mass within integer rounding; returns net mass delta.
- trace_
erosion_ droplet - Traces a single Lagrangian water droplet downhill, carrying and depositing sediment.