Computation of the quasi-steady gas flow in a spiral galaxy by means of a multigrid method