Freeze the field of a permanent magnet