Skip to content

Commit

Permalink
Fixed another box_return_coords_to_bounds function (#225)
Browse files Browse the repository at this point in the history
Co-authored-by: Juan Carlos Graciosa <juan.graciosa@monash.edu>
  • Loading branch information
jcgraciosa and Juan Carlos Graciosa authored Aug 12, 2024
1 parent 3bbbb73 commit 8780be7
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/underworld3/meshing.py
Original file line number Diff line number Diff line change
Expand Up @@ -530,17 +530,17 @@ def box_return_coords_to_bounds(coords):
x11s = coords[:, 1] > maxCoords[1]

if dim == 3:
x20s = coords[:, 1] < minCoords[2]
x21s = coords[:, 1] > maxCoords[2]
x20s = coords[:, 2] < minCoords[2]
x21s = coords[:, 2] > maxCoords[2]

coords[x00s, :] = minCoords[0]
coords[x01s, :] = maxCoords[0]
coords[x10s, :] = minCoords[1]
coords[x11s, :] = maxCoords[1]
coords[x00s, 0] = minCoords[0]
coords[x01s, 0] = maxCoords[0]
coords[x10s, 1] = minCoords[1]
coords[x11s, 1] = maxCoords[1]

if dim == 3:
coords[x20s, :] = minCoords[2]
coords[x21s, :] = maxCoords[2]
coords[x20s, 2] = minCoords[2]
coords[x21s, 2] = maxCoords[2]

return coords

Expand Down

0 comments on commit 8780be7

Please sign in to comment.