Magnetic domain walls and the relaxation method