You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You use a semi-Lagrangian approach (backtracking coordinates: src_x = x - vx * dt) with bilinear interpolation.
Observation: This introduces numerical diffusion (blurring), which acts as artificial damping. This is actually good for stability in a visual simulation, even if energy isn't perfectly conserved.
Optimize the update loop (Pointer Swapping)
Currently, you have pressure and pressure_scratch (implied or used in flow). In high-performance FDTD, we usually avoid copying data back and forth. Instead of: