From 5539b68009e6936238c060808b874e6a6e86a073 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Barschkis?= Date: Sat, 7 Mar 2020 19:56:51 +0100 Subject: Fluid: Optimization for smoke simulation (multigrid) The solver will now automatically detect static scenes (no moving obstacles) and use a slightly faster pressure solve in those cases. --- extern/mantaflow/preprocessed/gitinfo.h | 2 +- extern/mantaflow/preprocessed/plugin/pressure.cpp | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'extern/mantaflow') 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 &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; -- cgit v1.2.3