Dave,I've been meaning to make the program more robust to this situation, but I just haven't gotten around to it yet...The fix probably involves realizing that things aren't converging and choosing the step length in the Newton iteration in a way that forces the error to decrease.
Thank you very much for your advice. You're a real expert on this topic, because you help me to fix the problem that noised me for two weeks. My problem was caused by nonlinear material of initial permeability. After smooth out the curve, there is no problem to execute the software.
Thank you in advance,
Matthew