[SciPy-user] Convergence behaviour of iterative solvers

Nils Wagner nwagner at iam.uni-stuttgart.de
Fri Jan 19 09:25:28 CST 2007


Matthew Brett wrote:
> On 1/19/07, Giovanni Samaey <Giovanni.Samaey at cs.kuleuven.be> wrote:
>   
>> I needed this as well and I altered the GMRES function in scipy's linalg
>> file as follows:
>>
>> I added an input parameter prnt and
>> added at line 618 the following lines
>>
>> if prnt:
>>     print "#GMRES: ", nbiter,resid
>>     
>
> Or maybe an observer function of some sort for more flexibility:
>
> def show_convergence(nbiter, resid):
>    print "#GMRES: ", nbiter,resid
>
> def solver(...., observer_func = None)
> ...
> if observer_func:
>    observer_func(nbiter, resid)
>
> sort of thing.
>
> Matthew
> _______________________________________________
> SciPy-user mailing list
> SciPy-user at scipy.org
> http://projects.scipy.org/mailman/listinfo/scipy-user
>   
Whatever will be implemented in the future it would be a nice enhancement.

+1 for a monitoring function.

I can file a ticket if needed.

Nils


 



More information about the SciPy-user mailing list