fluid-sim/optimizationideas.md
unknown 7a1da2d29c
All checks were successful
studiorailgun/fluid-sim/pipeline/head This commit looks good
stable-ish multichunk solver
2024-03-15 16:56:09 -04:00

1.4 KiB

'sleep' chunks if there are no massive velocity swings for ~100 frames

  • unsleep as soon as new density or velocity is added

VVV These two may not work because the projection phase currently iterates over all cells with avx instructions it also may generally not work as fast moving water basically works by having empty cells query area that already has water (so maybe no sleeping air) 'sleep' individual cells that are full of water and fully surrounded by water 'sleep' terrain cells 'sleep' "inactive" cells

  • When reading data back into java, while iterating over each cell check if they've changed value
  • If not, add 1 to an accumulating array alongside the other ones (d, u, etc)
  • In C, if the accumulating array is >100 or some threshold, skip the cell
  • If a force gets added java side that is greater than some threshold, set all accumulating array to 0

multigrid method for projection code

intelligent neighbor awakening -- If a neighbor is asleep (say a neighbor full of air above this cell), do not simulate that neighbor at all Instead poll the currently awake cell for large velocity spikes in the direction of the neighbor If there is a large spike, awake the neighbor cell if a neighbor is awoken, the simulator should go back through and simulate for that chunk as well (idk if this is possible)

use avx bitmasking for handling terrain in projection code ???