Closed janbridley closed 1 month ago
I think a check against 0 is correct here. ELLIPSOID_OVERLAP_PRECISION
is a relative tolerance. If users would like to work in a system of units where typical particle diameters are 1e-50, they we should allow that.
pre-commit.ci autofix
Description
A check was added to verify values are within the expected range. ~I set the minimum allowed value to as well, but that may not be consistent if
ELLIPSOID_OVERLAP_PRECISION
(1e-6), which may or may not be the correct choice. We could do FLT_EPSILON fromHOOMD_SHORTREAL_SIZE==64
.~ I am open to suggestions about the correct value to assign.Errors occur then any semimajor axis is less than
0.0f
.Motivation and context
Overlap checks do not work for ellipsoids with any semimajor axis less than zero. This error (on the c++ level) prevents users from inadvertently encountering this issue.
Resolves #1762
How has this been tested?
A new test has been added that attempts to set invalid parameters. This tests values at zero, slightly above zero, and well below it.
Change log
Checklist:
sphinx-doc/credits.rst
) in the pull request source branch.