Expand description
GPU-accelerated SPH density computation (CPU mock implementation).
This module provides Smoothed Particle Hydrodynamics (SPH) density computation routines that mirror what would run on a GPU. All kernels are executed on the CPU via plain loops for portability.
Structs§
- GpuSph
Grid - A grid of SPH particles with associated physical quantities.
Functions§
- cubic_
spline_ kernel - Cubic-spline SPH kernel W(r, h).
- cubic_
spline_ kernel_ grad - Gradient of the cubic-spline kernel ∇W(r, h) along the displacement vector.
- gpu_
density_ kernel - Parallel density summation over all particle pairs (mock via loop).
- gpu_
force_ kernel - Pressure-gradient and viscosity force kernel (mock via loop).
- gpu_
neighbor_ list - Build a cell-list neighbor search structure.
- gpu_
pressure_ tait - Vectorized Tait EOS pressure update.
- launch_
density_ pass - Orchestrate a full SPH density pass.