Skip to content

Commit

Permalink
BUG: Fixed bug with xmask not defined
Browse files Browse the repository at this point in the history
  • Loading branch information
Fraser-Birks committed Sep 27, 2023
1 parent 1d036e9 commit eb581b7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/fracture_mechanics/parallel_NCFlex.py
Original file line number Diff line number Diff line change
Expand Up @@ -688,10 +688,10 @@ def main(K_range,alpha_range):
ypos = pos[:,1] - sy/2

#find the closest y atoms by finding which atoms lie within 1e-2 of the min
closest_y_mask = np.abs(ypos)<(np.min(np.abs(ypos[xmask]))+(1e-2))

#filter out all atoms with x less than 0
xmask = xpos>0
closest_y_mask = np.abs(ypos)<(np.min(np.abs(ypos[xmask]))+(1e-2))


#find the x positions of these atoms
closest_x = xpos[closest_y_mask&xmask]
Expand Down

0 comments on commit eb581b7

Please sign in to comment.