Skip to content

Commit

Permalink
set minimum eps based on tol
Browse files Browse the repository at this point in the history
  • Loading branch information
gertjanvanzwieten committed Jan 5, 2021
1 parent 240c81f commit d09c087
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nutils/topology.py
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,7 @@ def locate(self, geom, coords, *, tol, eps=0, maxiter=100, arguments=None, weigh
xi += numpy.linalg.solve(J_xi, coord - coord_xi)
except numpy.linalg.LinAlgError:
break
if converged and ref.inside(xi, eps=eps):
if converged and ref.inside(xi, eps=max(eps, *tol/abs(numpy.linalg.eigvals(J_xi)))):
ielems[ipoint] = ielem
xis[ipoint] = xi
break
Expand Down

0 comments on commit d09c087

Please sign in to comment.