Fluid: Small fix for secondary particles
authorSebastián Barschkis <sebbas@sebbas.org>
Wed, 25 Mar 2020 12:46:47 +0000 (13:46 +0100)
committerSebastián Barschkis <sebbas@sebbas.org>
Wed, 25 Mar 2020 15:08:05 +0000 (16:08 +0100)
Small tweak to ensure index will not run out of bounds during secondary particle computation.

intern/mantaflow/intern/strings/liquid_script.h

index 9321cc154662e2b3406b3b27bfb9e00d02193693..e9222fc7d93a8ed525fda6e6cb11d9517bbecae2 100644 (file)
@@ -361,7 +361,8 @@ def liquid_step_particles_$ID$():\n\
         interpolateGrid(target=phi_sp$ID$, source=phiTmp_s$ID$)\n\
         interpolateGrid(target=phiOut_sp$ID$, source=phiOut_s$ID$)\n\
     \n\
-    setObstacleFlags(flags=flags_sp$ID$, phiObs=phiObs_sp$ID$, phiOut=None, phiIn=None) # phiIn not needed\n\
+    # phiIn not needed, bwidth to 0 because we are omitting flags.initDomain()\n\
+    setObstacleFlags(flags=flags_sp$ID$, phiObs=phiObs_sp$ID$, phiOut=None, phiIn=None, boundaryWidth=0)\n\
     flags_sp$ID$.updateFromLevelset(levelset=phi_sp$ID$)\n\
     \n\
     # Actual secondary particle simulation\n\