Skip to main content

Module fluid_gpu

Module fluid_gpu 

Source
Expand description

GPU fluid simulation: Navier-Stokes, LBM kernels, SPH kernels, vortex confinement, and shallow-water equations — CPU mock backend.

All structures here simulate GPU buffer management and dispatch via in-memory Vecf64` buffers so that the logic can be unit-tested without a real GPU device.

Structs§

FluidGpuBuffer
A double-buffered GPU field for ping-pong updates.
FluidGpuPipeline
Ordered fluid GPU pipeline with memory bandwidth estimation.
LBMBoundaryKernelSpec
Specification of an LBM boundary kernel.
LBMCollisionKernelSpec
Specification of an LBM collision kernel.
LBMGpuKernels
GPU kernel manager for a Lattice Boltzmann Method simulation.
LBMStreamingSpec
Specification of an LBM streaming kernel.
NavierStokesGpu
GPU (CPU mock) Navier-Stokes solver on a 3-D Cartesian grid.
PipelinePass
A single pass (dispatch) in the fluid GPU pipeline.
SPHGpuKernels
GPU SPH particle data for density/pressure/viscosity kernels.
VortexConfinement
GPU vortex confinement — amplifies small-scale vortical structures to counteract numerical dissipation.
WaterSimGpu
GPU shallow-water equation (SWE) solver for height field and ripple simulation on a 2-D grid.

Enums§

BarrierKind
Synchronization barrier kind between GPU passes.
LBMBoundaryKind
Variants of supported LBM boundary conditions.

Constants§

D3Q19_Q
D3Q19 LBM velocity directions (19 discrete velocities).
D3Q19_WEIGHTS
D3Q19 lattice weights.