added docs
added docs
performance improvements for correctEnergyReduceVelocity