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.
This commit is contained in:
parent
5cae44ef6d
commit
06e3df4ce4
Notes:
blender-bot
2023-02-14 03:34:17 +01:00
Referenced by issue #75681, Mantaflow crash when trying to bake a cupcake: The CG solver diverged, residual norm > 1e30
|
@ -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\
|
||||
|
|
|
@ -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\
|
||||
|
|
Loading…
Reference in New Issue