We present an effective algorithm for solving the Poisson equation which is
used in the finite-difference scheme for the integration of hydrodynamic e
quations on a stationary grid in spherical coordinates when modeling stella
r evolution. The method is based on spherical functions and can be used in
one-, two-, and three-dimensional cases.