[SciPy-user] fsolve: Max iteration cut out

Gerber G <ggerber@sun.ac.za> ggerber at sun.ac.za
Tue Oct 21 15:48:22 EDT 2003


Hello,

This might be a trivial question..

I am currently programming finite elements. I am using optimize.fsolve to solve my non-linear set of equations. Two approaches were taken:

1) Use fsolve, supplied only with a function that computes the residual.
2) Use fsolve, supplied with a function for the residual and a function for the Jacobian.

Approach (1) gives satisfactory results after 25 function evaluations for each time-step. (This is a hyperbolic partial differential equation)

Approach (2) succeeds with the first time-step by using 30 function calls and 3 Jacobian calls. However, the time-steps that follow, terminates at 11 function calls with the error message: "The iteration is not making good progress, as measured by the improvement from the last ten iterations." The default setting in fsolve uses 100(N+1) as the maximum number of iterations. Why does it stop at 11 function calls?
Attached is the runs for the two approaches.

Thanks in advance,

George Gerber

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: Residual.txt
URL: <http://mail.scipy.org/pipermail/scipy-user/attachments/20031021/57228be4/attachment.txt>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: residualAndJacobian.txt
URL: <http://mail.scipy.org/pipermail/scipy-user/attachments/20031021/57228be4/attachment-0001.txt>


More information about the SciPy-User mailing list