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:
Diffstat (limited to 'extern/mantaflow/preprocessed/plugin/advection.cpp')
-rw-r--r--extern/mantaflow/preprocessed/plugin/advection.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/extern/mantaflow/preprocessed/plugin/advection.cpp b/extern/mantaflow/preprocessed/plugin/advection.cpp
index 4ccf33cc362..dd891e22088 100644
--- a/extern/mantaflow/preprocessed/plugin/advection.cpp
+++ b/extern/mantaflow/preprocessed/plugin/advection.cpp
@@ -1090,8 +1090,8 @@ struct extrapolateVelConvectiveBC : public KernelBase {
Real timeStep) const
{
if (flags.isOutflow(i, j, k)) {
- Vec3 bulkVel = getBulkVel(flags, vel, i, j, k);
- int dim = flags.is3D() ? 3 : 2;
+ const Vec3 bulkVel = getBulkVel(flags, vel, i, j, k);
+ const int dim = flags.is3D() ? 3 : 2;
const Vec3i cur = Vec3i(i, j, k);
Vec3i low, up, flLow, flUp;
int cnt = 0;
@@ -1099,8 +1099,8 @@ struct extrapolateVelConvectiveBC : public KernelBase {
for (int c = 0; c < dim; c++) {
low = up = flLow = flUp = cur;
Real factor = timeStep *
- max((Real)1.0, bulkVel[c]); // prevent the extrapolated velocity from
- // exploding when bulk velocity below 1
+ max((Real)1.0, abs(bulkVel[c])); // prevent the extrapolated velocity from
+ // exploding when bulk velocity below 1
low[c] = flLow[c] = cur[c] - 1;
up[c] = flUp[c] = cur[c] + 1;
// iterate over bWidth to allow for extrapolation into more distant outflow cells;