diff options
author | Sebastián Barschkis <sebbas@sebbas.org> | 2020-04-15 14:56:47 +0300 |
---|---|---|
committer | Sebastián Barschkis <sebbas@sebbas.org> | 2020-04-22 17:16:23 +0300 |
commit | 06e3df4ce45ffe093f01bdb8eff2c7b1cf26f26b (patch) | |
tree | dcceb6ec19adbe8dbc0a479cccfdb7b8dfc4dbc9 /intern/mantaflow | |
parent | 5cae44ef6d49253c9019fdaa84c9b76ecf98f141 (diff) |
Fix T75681: Mantaflow crash when trying to bake a cupcake: The CG solver diverged, residual norm > 1e30
Ensures that there are no enclosed holes between an obstacle and the domain walls.
Diffstat (limited to 'intern/mantaflow')
-rw-r--r-- | intern/mantaflow/intern/strings/liquid_script.h | 4 | ||||
-rw-r--r-- | intern/mantaflow/intern/strings/smoke_script.h | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/intern/mantaflow/intern/strings/liquid_script.h b/intern/mantaflow/intern/strings/liquid_script.h index b0bf6f85914..34994f115d7 100644 --- a/intern/mantaflow/intern/strings/liquid_script.h +++ b/intern/mantaflow/intern/strings/liquid_script.h @@ -173,14 +173,14 @@ def liquid_adaptive_step_$ID$(framenr):\n\ if using_obstacle_s$ID$:\n\ mantaMsg('Initializing obstacle levelset')\n\ phiObsIn_s$ID$.join(phiObsSIn_s$ID$) # Join static obstacle map\n\ - phiObsIn_s$ID$.fillHoles(maxDepth=int(res_s$ID$), boundaryWidth=2)\n\ + phiObsIn_s$ID$.fillHoles(maxDepth=int(res_s$ID$), boundaryWidth=1)\n\ extrapolateLsSimple(phi=phiObsIn_s$ID$, distance=6, inside=True)\n\ extrapolateLsSimple(phi=phiObsIn_s$ID$, distance=3, inside=False)\n\ phiObs_s$ID$.join(phiObsIn_s$ID$)\n\ \n\ # Using boundaryWidth=2 to not search beginning from walls (just a performance optimization)\n\ # Additional sanity check: fill holes in phiObs which can result after joining with phiObsIn\n\ - phiObs_s$ID$.fillHoles(maxDepth=int(res_s$ID$), boundaryWidth=2)\n\ + phiObs_s$ID$.fillHoles(maxDepth=int(res_s$ID$), boundaryWidth=2 if using_fractions_s$ID$ else 1)\n\ extrapolateLsSimple(phi=phiObs_s$ID$, distance=6, inside=True)\n\ extrapolateLsSimple(phi=phiObs_s$ID$, distance=3)\n\ \n\ diff --git a/intern/mantaflow/intern/strings/smoke_script.h b/intern/mantaflow/intern/strings/smoke_script.h index 7a855ff2cb8..cb651eb40b3 100644 --- a/intern/mantaflow/intern/strings/smoke_script.h +++ b/intern/mantaflow/intern/strings/smoke_script.h @@ -279,14 +279,14 @@ def smoke_adaptive_step_$ID$(framenr):\n\ if using_obstacle_s$ID$:\n\ mantaMsg('Initializing obstacle levelset')\n\ phiObsIn_s$ID$.join(phiObsSIn_s$ID$) # Join static obstacle map\n\ - phiObsIn_s$ID$.fillHoles(maxDepth=int(res_s$ID$), boundaryWidth=2)\n\ + phiObsIn_s$ID$.fillHoles(maxDepth=int(res_s$ID$), boundaryWidth=1)\n\ extrapolateLsSimple(phi=phiObsIn_s$ID$, distance=6, inside=True)\n\ extrapolateLsSimple(phi=phiObsIn_s$ID$, distance=3, inside=False)\n\ phiObs_s$ID$.join(phiObsIn_s$ID$)\n\ \n\ # Using boundaryWidth=2 to not search beginning from walls (just a performance optimization)\n\ # Additional sanity check: fill holes in phiObs which can result after joining with phiObsIn\n\ - phiObs_s$ID$.fillHoles(maxDepth=int(res_s$ID$), boundaryWidth=2)\n\ + phiObs_s$ID$.fillHoles(maxDepth=int(res_s$ID$), boundaryWidth=1)\n\ extrapolateLsSimple(phi=phiObs_s$ID$, distance=6, inside=True)\n\ extrapolateLsSimple(phi=phiObs_s$ID$, distance=3, inside=False)\n\ \n\ |