fix energy tracking of gravitational work in NewtonIntegrator