diff options
author | Sebastián Barschkis <sebbas@sebbas.org> | 2020-05-19 17:02:38 +0300 |
---|---|---|
committer | Sebastián Barschkis <sebbas@sebbas.org> | 2020-05-19 17:02:38 +0300 |
commit | 0c20fce2f2bf3ef8ebca8bc20d676a1d65d5203d (patch) | |
tree | 327b61ee4cfde44eb2755680125523729cf62899 /intern/mantaflow | |
parent | 03fa66d2740c6ab10df6a86430475dfa98fc0f20 (diff) |
Fix T76697: [Mantaflow] mesh generation does not account for some particles
Adapted mesh generation to account for domains with disabled fractionstoo.
Diffstat (limited to 'intern/mantaflow')
-rw-r--r-- | intern/mantaflow/intern/strings/liquid_script.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/intern/mantaflow/intern/strings/liquid_script.h b/intern/mantaflow/intern/strings/liquid_script.h index 9d1f1024ddb..e70ede206ba 100644 --- a/intern/mantaflow/intern/strings/liquid_script.h +++ b/intern/mantaflow/intern/strings/liquid_script.h @@ -349,7 +349,10 @@ def liquid_step_mesh_$ID$():\n\ interpolateMACGrid(target=vel_sm$ID$, source=vel_s$ID$)\n\ mVel_mesh$ID$.setSource(vel_sm$ID$, isMAC=True)\n\ \n\ - phi_sm$ID$.setBound(0.5,int(((upres_sm$ID$)*2)-2) )\n\ + # Set 0.5 boundary at walls + account for extra wall thickness in fractions mode + account for grid scaling:\n\ + # E.g. at upres=1 we expect 1 cell border (or 2 with fractions), at upres=2 we expect 2 cell border (or 4 with fractions), etc.\n\ + # Use -1 since setBound() starts counting at 0 (and additional -1 for fractions to account for solid/fluid interface cells)\n\ + phi_sm$ID$.setBound(value=0.5, boundaryWidth=(upres_sm$ID$*2)-2 if using_fractions_s$ID$ else upres_sm$ID$-1)\n\ phi_sm$ID$.createMesh(mesh_sm$ID$)\n"; const std::string liquid_step_particles = |