Fix T78170: Mantaflow Crash | Whitewater Particles Baking

Fixed issue in the upstream Mantaflow repository.
This commit is contained in:
Sebastián Barschkis 2020-06-26 18:29:14 +02:00
parent fb68a30af6
commit 84e1e0cf95
Notes: blender-bot 2023-02-14 11:28:43 +01:00
Referenced by issue #78170, Mantaflow Crash | Whitewater Particles Baking
2 changed files with 4 additions and 2 deletions

View File

@ -1,3 +1,3 @@
#define MANTA_GIT_VERSION "commit 5ae24e860cf15f1310666e119575cc01bea48598"
#define MANTA_GIT_VERSION "commit d80d3c821de74315ab26b5efd153d41477b976c4"

View File

@ -118,7 +118,9 @@ struct knFlipComputeSecondaryParticlePotentials : public KernelBase {
for (IndexInt x = i - radius; x <= i + radius; x++) {
for (IndexInt y = j - radius; y <= j + radius; y++) {
for (IndexInt z = k - radius; z <= k + radius; z++) {
if ((x == i && y == j && z == k) || !flags.isInBounds(Vec3i(x, y, z)) ||
// ensure that xyz is in bounds: use bnd=1 to ensure that vel.getCentered() always has a
// neighbor cell
if ((x == i && y == j && z == k) || !flags.isInBounds(Vec3i(x, y, z), 1) ||
(flags(x, y, z) & jtype))
continue;