Skip to content

Commit

Permalink
geometry: added floating point tolerance back into interior sectioning
Browse files Browse the repository at this point in the history
  • Loading branch information
EdCaunt committed Jun 29, 2023
1 parent 19c885b commit 0635e0a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion schism/geometry/geometry.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,8 +236,10 @@ def _get_interior_mask(self):
_, i = kdtree.query(query, workers=-1)

# Check nearest boundary point not in box
# Errs on the side of caution (cutoff slightly larger
# according to floating point precision)
interior = np.any(np.abs(query - bp[i])
> cutoff*np.array(spacing)[np.newaxis, :],
> (cutoff+_feps)*np.array(spacing)[np.newaxis, :],
axis=1)

# Fill interior mask away from boundary
Expand Down

0 comments on commit 0635e0a

Please sign in to comment.