Expand description
Auto-generated module
🤖 Generated with SplitRS
Constants§
- D2Q9_CX
- D2Q9 x-component velocity vectors.
- D2Q9_CY
- D2Q9 y-component velocity vectors.
- D2Q9_
OPP - D2Q9 opposite direction indices (for bounce-back).
- D2Q9_Q
- LBM D2Q9 velocity set index count.
- D2Q9_W
- D2Q9 equilibrium weights.
- D3Q27_Q
- LBM D3Q27 velocity set index count.
Functions§
- advect_
scalar - Semi-Lagrangian advection of a scalar field
phion a MAC grid. - compute_
vorticity - Compute curl (vorticity) of the velocity field at cell centers.
- g2p_
transfer - Grid-to-Particle (G2P) transfer: update particle velocities from MAC grid.
- gpu_
advect_ 2d - GPU semi-Lagrangian scalar field advection on a 2D regular grid.
- gpu_
apply_ boundary_ box - GPU boundary condition: clamp particles inside an AABB and reflect velocities.
- gpu_
jacobi_ pressure_ solve - GPU Jacobi pressure solver on a MAC grid.
- gpu_
lbm_ bgk_ collide - GPU-style BGK collision step for the D2Q9 LBM grid.
- gpu_
particle_ integrate_ euler - GPU Euler integration: v += adt, x += vdt.
- gpu_
particle_ integrate_ verlet - GPU Verlet integration using the previous time-step
dt_prev. - gpu_
pressure_ poisson_ jacobi_ 2d - GPU Jacobi solver for the 2D pressure-Poisson equation on a staggered grid.
- gpu_
reduce_ kinetic_ energy - GPU parallel reduction for total kinetic energy.
- gpu_
reduce_ momentum - GPU parallel reduction for total linear momentum.
- gpu_
sph_ density_ parallel - GPU-accelerated SPH density summation.
- morton_
encode_ 3d - Encode 3D integer coordinates into a 30-bit Morton (Z-order curve) code.
- morton_
expand_ bits - Expand a 10-bit integer into a 30-bit Morton code component (bit interleave).
- morton_
sort_ particles - Sort SPH particles by their Morton code for cache-friendly GPU access.
- p2g_
transfer - Particle-to-Grid (P2G) transfer: splat particle velocities onto MAC grid.
- sph_
compute_ density - Compute SPH density for all particles (mock GPU kernel dispatch).
- sph_
compute_ forces - Compute SPH forces: pressure gradient + viscosity + gravity + surface tension.
- sph_
compute_ pressure - Compute SPH pressure from density (Tait equation).
- sph_
integrate - Integrate SPH particles using semi-implicit Euler.
- sph_
step - Full SPH step: density → pressure → forces → integrate.
- surface_
tension_ csf - Surface tension force via Continuum Surface Force (CSF) method.
- vorticity_
confinement - Apply vorticity confinement forces to MAC grid velocities.