Added potential energy calculation to deformable body