Skip to content

Commit

Permalink
fix scaling issue for 1D advection (#46)
Browse files Browse the repository at this point in the history
  • Loading branch information
kmario23 committed Aug 24, 2023
1 parent f9fd131 commit 524848f
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ def flux(u):
fL = uL * beta
fR = uR * beta
# upwind advection scheme
f_upwd = (fR[1:cfg.multi.nx+2] + fL[2:cfg.multi.nx+3]
f_upwd = 0.5 * (fR[1:cfg.multi.nx+2] + fL[2:cfg.multi.nx+3]
- jnp.abs(beta)*(uL[2:cfg.multi.nx+3] - uR[1:cfg.multi.nx+2]))
return f_upwd

Expand Down

0 comments on commit 524848f

Please sign in to comment.