Fluid: Use different phi for levelset generation
authorSebastián Barschkis <sebbas@sebbas.org>
Mon, 23 Mar 2020 22:44:37 +0000 (23:44 +0100)
committerSebastián Barschkis <sebbas@sebbas.org>
Mon, 23 Mar 2020 22:50:39 +0000 (23:50 +0100)
Phi that is used for mesh should be the one that matches particles best.

intern/mantaflow/intern/strings/liquid_script.h

index 2376d49aace4d7b371d6430bea6650b8ae852881..297c2a8ed6bc2092916edfbf8ae3ca930566fd8a 100644 (file)
@@ -310,11 +310,11 @@ def liquid_step_mesh_$ID$():\n\
     \n\
     # no upres: just use the loaded grids\n\
     if upres_sm$ID$ <= 1:\n\
-        phi_sm$ID$.copyFrom(phiTmp_s$ID$)\n\
+        phi_sm$ID$.copyFrom(phi_s$ID$)\n\
     \n\
     # with upres: recreate grids\n\
     else:\n\
-        interpolateGrid(target=phi_sm$ID$, source=phiTmp_s$ID$)\n\
+        interpolateGrid(target=phi_sm$ID$, source=phi_s$ID$)\n\
     \n\
     # create surface\n\
     pp_sm$ID$.readParticles(pp_s$ID$)\n\