Skip to content

WIP: Removing exactAsphericalRot

Jérôme Duriez requested to merge soLongExactAsphRot into master

(In connection with !944 (merged)) I propose here to get rid of NewtonIntegrator.exactAsphericalRot.

As a reminder, that flag should contribute picking an appropriate integrator for Bodies with non-spherical inertia matrix (b.aspherical = True) but the contribution is unnecessary in my opinion (see below).

In terms of history, I think it was introduced (together with Fincham algorithm) as accRigidBodyRot in Nov 26, 2009 33b5d183 and quickly renamed as exactAsphericalRot in Dec 1, 2009 702d3590

At that time, that flag seemed to be the only criterion for choosing in NI between the simple, translation-like, algorithm and the more expensive one (even though Sergei might have in mind from the start some Body.isSpheral attribute similar in nature to current Body.aspherical, but it seems to me that Body.isSpheral was actually never implemented / used, outside of a code comment, which quickly disappeared in 78eb7b92).

Combining exactAsphericalRot with (direct) inertia considerations for picking an appropriate integrator then came in April 2010 3d4df5ff, and was further improved since.

But in the end, I do not really understand why we would need this flag. The rest of the current test in NI seems enough to me to avoid using the more expensive integrator when it is not needed.

And maybe we do not need to advertize for using a plain wrong integrator for aspherical bodies (if someone really wants to test it, that would still be possible after this MR anyway, by assigning b.aspherical to False even though the inertia matrix would not be spherical)

Merge request reports