Closed RiccardoFrenner closed 3 years ago
What should we do in this case? Return a vector with the correct length and a random orientation? (since the center is equally far from all points on the spherical surface)
I think it should be similar to the cylinder constraint, and therefore return a vector of the correct length and any direction.
When placing a particle at the center of a sphere constraint, the distance between the particle and the constraint is calculated incorrectly, resulting in a force on the particle which contains NANs.
Here is a MWE:
The scalar distance is actually calculated correctly, but the distance vector
vec
in Sphere.cpp contains NANs due toc_dist
being zero.