diff options
author | Sebastián Barschkis <sebbas@sebbas.org> | 2020-12-06 23:56:43 +0300 |
---|---|---|
committer | Sebastián Barschkis <sebbas@sebbas.org> | 2020-12-06 23:56:43 +0300 |
commit | 6f22a536e690133f7b7f9e62e6affd58d5ee2b6c (patch) | |
tree | cd86e2a4ea6195335ada638dce8fcf7a14664c30 /extern/mantaflow/preprocessed/plugin/pressure.cpp | |
parent | ee70eb96cf321e8aca2248b96c64680a33c7766f (diff) |
Fluid: Updated Mantaflow source files
Includes outflow optimization - might have been the cause of instabilities.
Diffstat (limited to 'extern/mantaflow/preprocessed/plugin/pressure.cpp')
-rw-r--r-- | extern/mantaflow/preprocessed/plugin/pressure.cpp | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/extern/mantaflow/preprocessed/plugin/pressure.cpp b/extern/mantaflow/preprocessed/plugin/pressure.cpp index dfba8e0082b..1100a58db47 100644 --- a/extern/mantaflow/preprocessed/plugin/pressure.cpp +++ b/extern/mantaflow/preprocessed/plugin/pressure.cpp @@ -1147,26 +1147,18 @@ void solvePressureSystem(Grid<Real> &rhs, gcg->setAccuracy(cgAccuracy); gcg->setUseL2Norm(useL2Norm); - int maxIter = 0; + int maxIter = (int)(cgMaxIterFac * flags.getSize().max()) * (flags.is3D() ? 1 : 4); Grid<Real> *pca0 = nullptr, *pca1 = nullptr, *pca2 = nullptr, *pca3 = nullptr; GridMg *pmg = nullptr; // optional preconditioning - if (preconditioner == PcNone || preconditioner == PcMIC) { - maxIter = (int)(cgMaxIterFac * flags.getSize().max()) * (flags.is3D() ? 1 : 4); - + if (preconditioner == PcMIC) { pca0 = new Grid<Real>(parent); pca1 = new Grid<Real>(parent); pca2 = new Grid<Real>(parent); pca3 = new Grid<Real>(parent); - - gcg->setICPreconditioner(preconditioner == PcMIC ? GridCgInterface::PC_mICP : - GridCgInterface::PC_None, - pca0, - pca1, - pca2, - pca3); + gcg->setICPreconditioner(GridCgInterface::PC_mICP, pca0, pca1, pca2, pca3); } else if (preconditioner == PcMGDynamic || preconditioner == PcMGStatic) { maxIter = 100; |