Skip to content

Commit

Permalink
fix for domain crossing event
Browse files Browse the repository at this point in the history
  • Loading branch information
shac170 committed Jan 22, 2024
1 parent 7bed157 commit a9ed5b5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions mcdc/kernel.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,9 @@ def domain_crossing(P, mcdc):
# Determine which dimension is crossed
x, y, z, t, directions = mesh_crossing_evaluate(P, mesh)
flag = directions[0]

if len(directions) > 1:
if len(directions) == 0:
return
elif len(directions) > 1:
for direction in directions[1:]:
if direction == MESH_X:
P["x"] -= SHIFT * P["ux"] / np.abs(P["ux"])
Expand Down

0 comments on commit a9ed5b5

Please sign in to comment.