Skip to main content

Module gpu_sph_pressure

Module gpu_sph_pressure 

Source
Expand description

GPU SPH pressure solver (CPU mock backend).

Implements the Smoothed Particle Hydrodynamics pressure and viscosity force computation pipeline using Poly6, Spiky, and Viscosity kernels. The GPU dispatch is mocked by plain Rust loops for portability.

Structs§

GpuSphPressureSolver
GPU SPH pressure solver holding all per-particle state.
GpuSphStats
Statistics computed from the pressure solver state.

Functions§

kernel_poly6
Poly6 SPH kernel: W_poly6(r, h).
kernel_spiky_grad
Gradient of the Spiky kernel: ∇W_spiky(r_vec, r, h).
kernel_viscosity_laplacian
Viscosity kernel Laplacian: ∇²W_visc(r, h).
pcisph_gpu_correction
PCISPH pressure correction loop.
wcsph_tait_eos
WCSPH Tait equation of state.