Expand description
SPH (Smoothed Particle Hydrodynamics) compute kernels.
Structs§
- Neighbor
List - A simple grid-based neighbor list for SPH.
- SphBuffer
Layout - Describes the buffer layout for SPH simulation data.
- SphDensity
Kernel - Kernel that computes SPH particle densities.
- SphDispatch
Config - Configuration for dispatching SPH compute kernels.
- SphForce
Kernel - Kernel that computes SPH pressure and viscosity forces.
- SphKernel
Params - Pre-computed parameters for a smoothing kernel with smoothing length
h. - SphNeighbor
List Kernel - Kernel that constructs a neighbor list on the CPU.
Enums§
- SphKernel
- Selects the smoothing kernel function to use for SPH computations.
Functions§
- artificial_
viscosity_ force - Artificial viscosity for SPH (Monaghan 1992 formulation).
- build_
neighbor_ list_ explicit - Build an explicit neighbour list: for each particle, store all particle
indices within distance
h. - cfl_
timestep - Compute the CFL-limited time step for a particle system.
- density_
accumulation - Accumulate density contributions from a neighbour list.
- density_
summation - Compute per-particle densities using SPH summation.
- density_
summation_ kernel - Compute per-particle densities with a specified kernel type.
- integrate_
kernel_ sphere - Numerically integrate the kernel over a sphere of radius
husing Monte Carlo. - kernel_
gradient - Evaluate the gradient nabla W(r_vec, h) of the smoothing kernel.
- kernel_
value - Evaluate the smoothing kernel W(r, h) for a given kernel type.
- mean_
neighbor_ count - Compute average number of neighbours per particle.
- normalize_
normal - Normalize a surface normal vector. Returns zero vector if magnitude is too small.
- pressure_
force - Compute pressure forces using the SPH symmetric pressure gradient formulation.
- pressure_
force_ kernel - Symmetric SPH pressure force kernel using neighbour lists.
- radix_
sort_ by_ density - Sort particle indices in ascending order of density using a reference sort.
- surface_
normal_ kernel - Compute approximate surface normals using the color function gradient method.
- surface_
tension_ force - Compute surface tension forces using the color function gradient (CSF) method.
- viscosity_
force - Compute viscosity forces using the SPH viscosity formulation.
- wcsph_
euler_ step - Apply one explicit WCSPH Euler step.
- wcsph_
leapfrog_ velocity_ half - Apply one leap-frog WCSPH half-step (velocity update only).
- wcsph_
pressure - Equation of state for WCSPH:
p = B * ((rho/rho0)^gamma - 1).