Safety checks.
Merge pull request #324 from pleroy/Barycentre

Safety checks in physics::Barycentre.