Skip to content

Commit

Permalink
Fix bug introduced in refactoring of PR #5
Browse files Browse the repository at this point in the history
  • Loading branch information
pkestene committed Sep 10, 2024
1 parent 70026a0 commit a9d232c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/muscl/MHDRunFunctors2D.h
Original file line number Diff line number Diff line change
Expand Up @@ -1409,10 +1409,10 @@ class ReconstructEdgeComputeEmfAndUpdateFunctor2D : public MHDBaseFunctor2D
sign_b = -1;
}

const real_t A = Udata_in(i0 + ia, j0 + ja, IA) + sFaceMag(i0, j0, IX);
const real_t A = Udata_in(i0 + ia, j0 + ja, IA) + sFaceMag(i0 + ia, j0 + ja, IX);
const real_t dAy = compute_limited_slope<DIR_Y>(Udata_in, i0 + ia, j0 + ja, IA);

const real_t B = Udata_in(i0 + ib, j0 + jb, IB) + sFaceMag(i0, j0, IY);
const real_t B = Udata_in(i0 + ib, j0 + jb, IB) + sFaceMag(i0 + ib, j0 + jb, IY);
const real_t dBx = compute_limited_slope<DIR_X>(Udata_in, i0 + ib, j0 + jb, IB);

// get limited slopes
Expand Down
8 changes: 4 additions & 4 deletions src/muscl/MHDRunFunctors3D.h
Original file line number Diff line number Diff line change
Expand Up @@ -1453,13 +1453,13 @@ class ReconstructEdgeComputeEmfAndUpdateFunctor3D : public MHDBaseFunctor3D
sign_b1 = -1;
}

const real_t B0 =
Udata_in(ic + ijk0[IX], jc + ijk0[IY], kc + ijk0[IZ], IA + dir0) + sFaceMag(ic, jc, kc, dir0);
const real_t B0 = Udata_in(ic + ijk0[IX], jc + ijk0[IY], kc + ijk0[IZ], IA + dir0) +
sFaceMag(ic + ijk0[IX], jc + ijk0[IY], kc + ijk0[IZ], dir0);
const real_t dB0d1 = compute_limited_slope<static_cast<Direction>(dir1)>(
Udata_in, ic + ijk0[IX], jc + ijk0[IY], kc + ijk0[IZ], IA + dir0);

const real_t B1 =
Udata_in(ic + ijk1[IX], jc + ijk1[IY], kc + ijk1[IZ], IA + dir1) + sFaceMag(ic, jc, kc, dir1);
const real_t B1 = Udata_in(ic + ijk1[IX], jc + ijk1[IY], kc + ijk1[IZ], IA + dir1) +
sFaceMag(ic + ijk1[IX], jc + ijk1[IY], kc + ijk1[IZ], dir1);
const real_t dB1d0 = compute_limited_slope<static_cast<Direction>(dir0)>(
Udata_in, ic + ijk1[IX], jc + ijk1[IY], kc + ijk1[IZ], IA + dir1);

Expand Down

0 comments on commit a9d232c

Please sign in to comment.