A nonspherical glass particle relaxes to its equilibrium shape by viscous flow driven by capillarity at elevated temperatures. The virial method is applied to Stokes equation for studying the viscous sintering of an ellipsoidal particle. The spheroidization, or the retraction of the particle, is a result of anisotropic deformation driven by the deviatoric components of the sintering stress, which arises from the surface energy tensor. The present simulation of spheroidization is in good agreement with the prediction by the three-dimensional finite element method. Jackson and Tucker's model on deformation of a liquid droplet can be also understood as a response to the sintering stress.