Fixed calculation of virial from mesh order parameter