Skip to main content

Module gpu_sph_density

Module gpu_sph_density 

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

GpuSphGrid
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.