  Magnetic flux dynamics in type-II superconductors is studied within the model
of a viscous nonlinear diffusion of vortices for various sample geometries. We
find that time dependence of magnetic moment relaxation after the field is
switched off can be accurately approximated by $m(t)\propto
1-\sqrt{t/\tilde\tau}$ in the narrow initial time interval and by $m(t)\propto
(1+t/\tau)^{-1}$ at later times before the flux creep sets in. The
characteristic times $\tilde\tau$ and $\tau$ are proportional to the viscous
drag coefficient $\eta$. Quantitative agreement with available experimental
data is obtained for both conventional and high-temperature superconductors
with $\eta$ exceeding by many orders of magnitude the Bardeen-Stephen
coefficient for free vortices. Huge enhancement of the drag, as well as its
exponential temperature dependence, indicates a strong influence of pinning
centers on the flux diffusion. Notwithstanding complexity of the vortex motion
in the presence of pinning and thermal agitation, we argue that the initial
relaxation of magnetization can still be considered as a viscous flux flow with
an effective drag coefficient.
