diff options
author | Sebastián Barschkis <sebbas@sebbas.org> | 2020-06-25 17:49:16 +0300 |
---|---|---|
committer | Sebastián Barschkis <sebbas@sebbas.org> | 2020-06-25 17:49:47 +0300 |
commit | 495b0eff9a2d5e3f32c6fd954107bfbf709f33c3 (patch) | |
tree | f7450251045989092d08c84d2a9fefd922756164 /intern/mantaflow | |
parent | b77fc70d138603bc827fc9d564519a632f3410a3 (diff) |
Fix T77285: Incorrect Mantaflow fluid border interaction when collision is turned off
Incorrect boolean for 'open' domain borders.
Diffstat (limited to 'intern/mantaflow')
-rw-r--r-- | intern/mantaflow/intern/MANTA_main.cpp | 2 | ||||
-rw-r--r-- | intern/mantaflow/intern/strings/fluid_script.h | 2 | ||||
-rw-r--r-- | intern/mantaflow/intern/strings/liquid_script.h | 6 | ||||
-rw-r--r-- | intern/mantaflow/intern/strings/smoke_script.h | 6 |
4 files changed, 8 insertions, 8 deletions
diff --git a/intern/mantaflow/intern/MANTA_main.cpp b/intern/mantaflow/intern/MANTA_main.cpp index e81b2b2e268..0ccc9d2b57c 100644 --- a/intern/mantaflow/intern/MANTA_main.cpp +++ b/intern/mantaflow/intern/MANTA_main.cpp @@ -755,7 +755,7 @@ void MANTA::initializeRNAMap(FluidModifierData *mmd) mRNAMap["USING_OUTFLOW"] = getBooleanString(mds->active_fields & FLUID_DOMAIN_ACTIVE_OUTFLOW); mRNAMap["USING_LOG_DISSOLVE"] = getBooleanString(mds->flags & FLUID_DOMAIN_USE_DISSOLVE_LOG); mRNAMap["USING_DISSOLVE"] = getBooleanString(mds->flags & FLUID_DOMAIN_USE_DISSOLVE); - mRNAMap["DO_OPEN"] = getBooleanString(mds->border_collisions == 0); + mRNAMap["DOMAIN_CLOSED"] = getBooleanString(borderCollisions.compare("") == 0); mRNAMap["CACHE_RESUMABLE"] = getBooleanString(mds->flags & FLUID_DOMAIN_USE_RESUMABLE_CACHE); mRNAMap["USING_ADAPTIVETIME"] = getBooleanString(mds->flags & FLUID_DOMAIN_USE_ADAPTIVE_TIME); mRNAMap["USING_SPEEDVECTORS"] = getBooleanString(mds->flags & FLUID_DOMAIN_USE_SPEED_VECTORS); diff --git a/intern/mantaflow/intern/strings/fluid_script.h b/intern/mantaflow/intern/strings/fluid_script.h index 0fb577cc109..62274101859 100644 --- a/intern/mantaflow/intern/strings/fluid_script.h +++ b/intern/mantaflow/intern/strings/fluid_script.h @@ -96,7 +96,7 @@ gravity_s$ID$ = vec3($GRAVITY_X$, $GRAVITY_Y$, $GRAVITY_Z$) # in SI unit (e.g. m gs_s$ID$ = vec3($RESX$, $RESY$, $RESZ$)\n\ maxVel_s$ID$ = 0\n\ \n\ -doOpen_s$ID$ = $DO_OPEN$\n\ +domainClosed_s$ID$ = $DOMAIN_CLOSED$\n\ boundConditions_s$ID$ = '$BOUND_CONDITIONS$'\n\ boundaryWidth_s$ID$ = $BOUNDARY_WIDTH$\n\ deleteInObstacle_s$ID$ = $DELETE_IN_OBSTACLE$\n\ diff --git a/intern/mantaflow/intern/strings/liquid_script.h b/intern/mantaflow/intern/strings/liquid_script.h index 1dec61c02da..d7ba220d2c3 100644 --- a/intern/mantaflow/intern/strings/liquid_script.h +++ b/intern/mantaflow/intern/strings/liquid_script.h @@ -257,7 +257,7 @@ def liquid_step_$ID$():\n\ extrapolateLsSimple(phi=phi_s$ID$, distance=3)\n\ phi_s$ID$.setBoundNeumann(0) # make sure no particles are placed at outer boundary\n\ \n\ - if doOpen_s$ID$ or using_outflow_s$ID$:\n\ + if not domainClosed_s$ID$ or using_outflow_s$ID$:\n\ resetOutflow(flags=flags_s$ID$, phi=phi_s$ID$, parts=pp_s$ID$, index=gpi_s$ID$, indexSys=pindex_s$ID$)\n\ flags_s$ID$.updateFromLevelset(phi_s$ID$)\n\ \n\ @@ -298,10 +298,10 @@ def liquid_step_$ID$():\n\ \n\ if using_guiding_s$ID$:\n\ mantaMsg('Guiding and pressure')\n\ - PD_fluid_guiding(vel=vel_s$ID$, velT=velT_s$ID$, flags=flags_s$ID$, phi=phi_s$ID$, curv=curvature_s$ID$, surfTens=surfaceTension_s$ID$, fractions=fractions_s$ID$, weight=weightGuide_s$ID$, blurRadius=beta_sg$ID$, pressure=pressure_s$ID$, tau=tau_sg$ID$, sigma=sigma_sg$ID$, theta=theta_sg$ID$, zeroPressureFixing=not doOpen_s$ID$)\n\ + PD_fluid_guiding(vel=vel_s$ID$, velT=velT_s$ID$, flags=flags_s$ID$, phi=phi_s$ID$, curv=curvature_s$ID$, surfTens=surfaceTension_s$ID$, fractions=fractions_s$ID$, weight=weightGuide_s$ID$, blurRadius=beta_sg$ID$, pressure=pressure_s$ID$, tau=tau_sg$ID$, sigma=sigma_sg$ID$, theta=theta_sg$ID$, zeroPressureFixing=domainClosed_s$ID$)\n\ else:\n\ mantaMsg('Pressure')\n\ - solvePressure(flags=flags_s$ID$, vel=vel_s$ID$, pressure=pressure_s$ID$, phi=phi_s$ID$, curv=curvature_s$ID$, surfTens=surfaceTension_s$ID$, fractions=fractions_s$ID$, obvel=obvel_s$ID$ if using_fractions_s$ID$ else None)\n\ + solvePressure(flags=flags_s$ID$, vel=vel_s$ID$, pressure=pressure_s$ID$, phi=phi_s$ID$, curv=curvature_s$ID$, surfTens=surfaceTension_s$ID$, fractions=fractions_s$ID$, obvel=obvel_s$ID$ if using_fractions_s$ID$ else None, zeroPressureFixing=domainClosed_s$ID$)\n\ \n\ extrapolateMACSimple(flags=flags_s$ID$, vel=vel_s$ID$, distance=4, intoObs=True if using_fractions_s$ID$ else False)\n\ setWallBcs(flags=flags_s$ID$, vel=vel_s$ID$, obvel=None if using_fractions_s$ID$ else obvel_s$ID$, phiObs=phiObs_s$ID$, fractions=fractions_s$ID$)\n\ diff --git a/intern/mantaflow/intern/strings/smoke_script.h b/intern/mantaflow/intern/strings/smoke_script.h index 5e80e4443a3..c97ab2eb988 100644 --- a/intern/mantaflow/intern/strings/smoke_script.h +++ b/intern/mantaflow/intern/strings/smoke_script.h @@ -365,7 +365,7 @@ def smoke_step_$ID$():\n\ mantaMsg('Advecting velocity')\n\ advectSemiLagrange(flags=flags_s$ID$, vel=vel_s$ID$, grid=vel_s$ID$, order=2)\n\ \n\ - if doOpen_s$ID$ or using_outflow_s$ID$:\n\ + if not domainClosed_s$ID$ or using_outflow_s$ID$:\n\ resetOutflow(flags=flags_s$ID$, real=density_s$ID$)\n\ \n\ mantaMsg('Vorticity')\n\ @@ -406,10 +406,10 @@ def smoke_step_$ID$():\n\ mantaMsg('Using preconditioner: ' + str(preconditioner_s$ID$))\n\ if using_guiding_s$ID$:\n\ mantaMsg('Guiding and pressure')\n\ - PD_fluid_guiding(vel=vel_s$ID$, velT=velT_s$ID$, flags=flags_s$ID$, weight=weightGuide_s$ID$, blurRadius=beta_sg$ID$, pressure=pressure_s$ID$, tau=tau_sg$ID$, sigma=sigma_sg$ID$, theta=theta_sg$ID$, preconditioner=preconditioner_s$ID$, zeroPressureFixing=not doOpen_s$ID$)\n\ + PD_fluid_guiding(vel=vel_s$ID$, velT=velT_s$ID$, flags=flags_s$ID$, weight=weightGuide_s$ID$, blurRadius=beta_sg$ID$, pressure=pressure_s$ID$, tau=tau_sg$ID$, sigma=sigma_sg$ID$, theta=theta_sg$ID$, preconditioner=preconditioner_s$ID$, zeroPressureFixing=domainClosed_s$ID$)\n\ else:\n\ mantaMsg('Pressure')\n\ - solvePressure(flags=flags_s$ID$, vel=vel_s$ID$, pressure=pressure_s$ID$, preconditioner=preconditioner_s$ID$, zeroPressureFixing=not doOpen_s$ID$) # closed domains require pressure fixing\n\ + solvePressure(flags=flags_s$ID$, vel=vel_s$ID$, pressure=pressure_s$ID$, preconditioner=preconditioner_s$ID$, zeroPressureFixing=domainClosed_s$ID$) # closed domains require pressure fixing\n\ \n\ def process_burn_$ID$():\n\ mantaMsg('Process burn')\n\ |