X3 prolongation limiter uses spacing as gradient output
Summary
ProlongateCellMinModMultiD::Do passes dx3p as the final GradMinMod argument for
the x3 slope calculation.
Why this is a bug
The x1 and x2 branches pass gx1m, gx1p and gx2m, gx2p. The x3 branch should pass
gx3m, gx3p, but it passes gx3m, dx3p. This corrupts the plus-side x3 limited
gradient in 3D AMR prolongation and can produce incorrect fine-cell values.
Patch
diff --git a/src/hydro/prolongation/custom_ops.hpp b/src/hydro/prolongation/custom_ops.hpp
--- a/src/hydro/prolongation/custom_ops.hpp
+++ b/src/hydro/prolongation/custom_ops.hpp
@@
gx3c =
GradMinMod(fc, coarse(element_idx, l, m, n, k - 1, j, i),
- coarse(element_idx, l, m, n, k + 1, j, i), dx3m, dx3p, gx3m, dx3p);
+ coarse(element_idx, l, m, n, k + 1, j, i), dx3m, dx3p, gx3m, gx3p);
X3 prolongation limiter uses spacing as gradient output
Summary
ProlongateCellMinModMultiD::Dopassesdx3pas the finalGradMinModargument forthe x3 slope calculation.
Why this is a bug
The x1 and x2 branches pass
gx1m, gx1pandgx2m, gx2p. The x3 branch should passgx3m, gx3p, but it passesgx3m, dx3p. This corrupts the plus-side x3 limitedgradient in 3D AMR prolongation and can produce incorrect fine-cell values.
Patch