Skip to content

Commit

Permalink
Merge branch 'burgers-fix' into incompressible_simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
zhichen3 committed Apr 27, 2023
2 parents 8074edb + 10d00c6 commit b2d1d5b
Showing 1 changed file with 16 additions and 8 deletions.
24 changes: 16 additions & 8 deletions pyro/burgers/burgers_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,20 +135,28 @@ def apply_transverse_corrections(grid, dt,
vbar.v(buf=2)[:, :] = 0.5 * (vhat_adv.v(buf=2) + vhat_adv.jp(1, buf=2))

# the transverse term for the u states on x-interfaces
u_xl.ip(1, buf=2)[:, :] += -0.5 * dtdy * vbar.v(buf=2) * (u_yint.jp(1, buf=2) - u_yint.v(buf=2))
u_xr.v(buf=2)[:, :] += -0.5 * dtdy * vbar.v(buf=2) * (u_yint.jp(1, buf=2) - u_yint.v(buf=2))
u_xl.ip(1, buf=2)[:, :] += -0.5 * dtdy * vbar.v(buf=2) * \
(u_yint.jp(1, buf=2) - u_yint.v(buf=2))
u_xr.v(buf=2)[:, :] += -0.5 * dtdy * vbar.v(buf=2) * \
(u_yint.jp(1, buf=2) - u_yint.v(buf=2))

# the transverse term for the v states on x-interfaces
v_xl.ip(1, buf=2)[:, :] += -0.5 * dtdy * vbar.v(buf=2) * (v_yint.jp(1, buf=2) - v_yint.v(buf=2))
v_xr.v(buf=2)[:, :] += -0.5 * dtdy * vbar.v(buf=2) * (v_yint.jp(1, buf=2) - v_yint.v(buf=2))
v_xl.ip(1, buf=2)[:, :] += -0.5 * dtdy * vbar.v(buf=2) * \
(v_yint.jp(1, buf=2) - v_yint.v(buf=2))
v_xr.v(buf=2)[:, :] += -0.5 * dtdy * vbar.v(buf=2) * \
(v_yint.jp(1, buf=2) - v_yint.v(buf=2))

# the transverse term for the v states on y-interfaces
v_yl.jp(1, buf=2)[:, :] += -0.5 * dtdx * ubar.v(buf=2) * (v_xint.ip(1, buf=2) - v_xint.v(buf=2))
v_yr.v(buf=2)[:, :] += -0.5 * dtdx * ubar.v(buf=2) * (v_xint.ip(1, buf=2) - v_xint.v(buf=2))
v_yl.jp(1, buf=2)[:, :] += -0.5 * dtdx * ubar.v(buf=2) * \
(v_xint.ip(1, buf=2) - v_xint.v(buf=2))
v_yr.v(buf=2)[:, :] += -0.5 * dtdx * ubar.v(buf=2) * \
(v_xint.ip(1, buf=2) - v_xint.v(buf=2))

# the transverse term for the u states on y-interfaces
u_yl.jp(1, buf=2)[:, :] += -0.5 * dtdx * ubar.v(buf=2) * (u_xint.ip(1, buf=2) - u_xint.v(buf=2))
u_yr.v(buf=2)[:, :] += -0.5 * dtdx * ubar.v(buf=2) * (u_xint.ip(1, buf=2) - u_xint.v(buf=2))
u_yl.jp(1, buf=2)[:, :] += -0.5 * dtdx * ubar.v(buf=2) * \
(u_xint.ip(1, buf=2) - u_xint.v(buf=2))
u_yr.v(buf=2)[:, :] += -0.5 * dtdx * ubar.v(buf=2) * \
(u_xint.ip(1, buf=2) - u_xint.v(buf=2))

return u_xl, u_xr, u_yl, u_yr, v_xl, v_xr, v_yl, v_yr

Expand Down

0 comments on commit b2d1d5b

Please sign in to comment.