Skip to content

Commit

Permalink
fix: index for upwind variable scheme to recover i/j symmetry (#120)
Browse files Browse the repository at this point in the history
Co-authored-by: Nicolas Grenier <nicolas.grenier@lisn.upsaclay.fr>
  • Loading branch information
Grenier and Nicolas Grenier authored Sep 6, 2023
1 parent 2b47dd7 commit 48d7e58
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion demos/FiniteVolume/stencil_field.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ namespace samurai
auto vel_at_interface = xt::eval(3. / 8 * vel(0, level, i + 1, j) + 3. / 4 * vel(0, level, i, j)
- 1. / 8 * vel(0, level, i - 1, j));

auto denom = xt::eval(u(level, i + 1, j) - u(level, i + 2, j));
auto denom = xt::eval(u(level, i + 1, j) - u(level, i, j));
auto mask = xt::abs(denom) < 1.e-8;
xt::masked_view(denom, mask) = 1.e-8;

Expand Down
Binary file not shown.
Binary file not shown.

0 comments on commit 48d7e58

Please sign in to comment.