A dependence of a relaxation rate on the shape of the demagnetized region for a longitudinal evolution of total magnetization to its equilibrium value following the ultrafast demagnetization is demonstrated. This shapedependence is caused by a motion ofthe wave front inside the demagnetized region. The contribution of the wave front for spherically symmetric shape of the demagnetized region is up to 3 times and for cylindrically symmetric shape up to 2 times stronger than for one dimensional demagnetized region. This effect can be observed after the demagnetization by a tightly focused femtosecond laser pulse.