Skip to content
Snippets Groups Projects
Commit 9cc11ed2 authored by Andreas Klöckner's avatar Andreas Klöckner
Browse files

Follow-up fixes for 687a28bf in eager examples

parent 8686e6de
No related branches found
No related tags found
No related merge requests found
......@@ -59,9 +59,9 @@ def wave_flux(discr, c, w_tpair):
)
# upwind
v_jump = np.dot(normal, v.int-v.ext)
v_jump = np.dot(normal, v.ext-v.int)
flux_weak += flat_obj_array(
0.5*(u.int-u.ext),
0.5*(u.ext-u.int),
0.5*normal*scalar(v_jump),
)
......
......@@ -60,10 +60,9 @@ def wave_flux(discr, c, w_tpair):
)
# upwind
v_jump = np.dot(normal, v.int-v.ext)
flux_weak += flat_obj_array(
0.5*(u.int-u.ext),
0.5*normal*scalar(v_jump),
0.5*(u.ext-u.int),
0.5*normal*scalar(np.dot(normal, v.ext-v.int)),
)
# FIXME this flux is only correct for continuous c
......
......@@ -57,10 +57,9 @@ def wave_flux(discr, c, w_tpair):
)
# upwind
v_jump = np.dot(normal, v.int-v.ext)
flux_weak += flat_obj_array(
0.5*(u.int-u.ext),
0.5*normal*scalar(v_jump),
0.5*(u.ext-u.int),
0.5*normal*scalar(np.dot(normal, v.ext-v.int)),
)
return discr.project(w_tpair.dd, "all_faces", c*flux_weak)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment