pub fn gpu_sph_density_parallel(
particles: &mut Vec<SphParticle>,
config: &SphConfig,
)Expand description
GPU-accelerated SPH density summation.
Simulates a GPU kernel where each “thread” computes the density contribution from all neighbours within the smoothing radius h. In a real GPU implementation this would be launched as one thread per particle pair with atomic accumulation. Here we use a parallel-style double loop and write results into a temporary buffer first to keep the interface identical to a real GPU dispatch.