Skip to content

Commit

Permalink
validate flux_type
Browse files Browse the repository at this point in the history
  • Loading branch information
matthiasdiener authored and inducer committed May 15, 2024
1 parent ca2f14e commit dcd5812
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion examples/advection.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,9 @@ def weak_flux(self, vec):
flux = self.dg.array_ops.stack((vec[:, 0], swp[:, 1]), axis=1)
else:
flux = self.dg.array_ops.stack((swp[:, 0], vec[:, 1]), axis=1)
else:
raise ValueError("Invalid flux type")

# pylint: disable=used-before-assignment
flux = flux * self.c * self.dg.normals

return flux
Expand Down

0 comments on commit dcd5812

Please sign in to comment.