Prediction of flux loss in a Nd-Fe-B ring magnet considering magnetizing process