Skip to main content

Module erosion_fixed824

Module erosion_fixed824 

Source
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§

CoupledErosionParams
Parameters for coupled 6-species stratigraphic erosion.
StrataCell6
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 f32 value to 8.24 fixed-point format (i64).
fixed824_to_f32
Converts an 8.24 fixed-point format (i64) to f32.
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.