Fix pe::findContainingProcess for bodies within -1*epsilon of a block edge
Assume a block size B, domain size L and a body on the second block that is at B-std::numeric_limits<real_T>::epsilon*L
. Then block.getAABB().contains()
is false because the second block does not contain the body, but in the attempt to find the responsible neighbor block, findContainingProcess
uses mapToPeriodicDomain
, which calculates something like (B-std::numeric_limits<real_T>::epsilon*L + L) % L
. Due to finite precision this is equal to B and inside the second block.
Previously, this meant that the body became owner-less and was deleted. Of course, that's wrong.