Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--extern/mantaflow/preprocessed/gitinfo.h2
-rw-r--r--extern/mantaflow/preprocessed/plugin/pressure.cpp5
-rw-r--r--intern/mantaflow/intern/strings/smoke_script.h4
3 files changed, 9 insertions, 2 deletions
diff --git a/extern/mantaflow/preprocessed/gitinfo.h b/extern/mantaflow/preprocessed/gitinfo.h
index 29a9158d5c3..48bb85c8479 100644
--- a/extern/mantaflow/preprocessed/gitinfo.h
+++ b/extern/mantaflow/preprocessed/gitinfo.h
@@ -1,3 +1,3 @@
-#define MANTA_GIT_VERSION "commit 1d52e96ad602f1974dfee75bef293bc397e4b41b"
+#define MANTA_GIT_VERSION "commit 1d55979473c25318f39c4a6bf48a5ab77b3bf39b"
diff --git a/extern/mantaflow/preprocessed/plugin/pressure.cpp b/extern/mantaflow/preprocessed/plugin/pressure.cpp
index 7def2669e36..780ba44a2b5 100644
--- a/extern/mantaflow/preprocessed/plugin/pressure.cpp
+++ b/extern/mantaflow/preprocessed/plugin/pressure.cpp
@@ -1171,6 +1171,11 @@ void solvePressureSystem(Grid<Real> &rhs,
maxIter = 100;
pmg = gMapMG[parent];
+ // Release MG from previous step if present (e.g. if previous solve was with MGStatic)
+ if (pmg && preconditioner == PcMGDynamic) {
+ releaseMG(parent);
+ pmg = nullptr;
+ }
if (!pmg) {
pmg = new GridMg(pressure.getSize());
gMapMG[parent] = pmg;
diff --git a/intern/mantaflow/intern/strings/smoke_script.h b/intern/mantaflow/intern/strings/smoke_script.h
index 7a6a2a6d7bf..fb2eaa9b441 100644
--- a/intern/mantaflow/intern/strings/smoke_script.h
+++ b/intern/mantaflow/intern/strings/smoke_script.h
@@ -30,7 +30,7 @@
const std::string smoke_variables =
"\n\
mantaMsg('Smoke variables low')\n\
-preconditioner_s$ID$ = PcMGDynamic\n\
+preconditioner_s$ID$ = PcMGStatic\n\
using_colors_s$ID$ = $USING_COLORS$\n\
using_heat_s$ID$ = $USING_HEAT$\n\
using_fire_s$ID$ = $USING_FIRE$\n\
@@ -391,6 +391,8 @@ def smoke_step_$ID$():\n\
mantaMsg('Walls')\n\
setWallBcs(flags=flags_s$ID$, vel=vel_s$ID$, obvel=obvel_s$ID$ if using_obstacle_s$ID$ else None)\n\
\n\
+ preconditioner_s$ID$ = PcMGDynamic if using_obstacle_s$ID$ and obvel_s$ID$.getMax() > 0 else PcMGStatic\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\