On 2 December 2015 at 12:26, Pauli Virtanen <pav@iki.fi> wrote:
Tue, 01 Dec 2015 21:48:27 -0300, zimon toutoune kirjoitti:
I am looking for an explanation why GMRes [scipy.sparse.linalg.gmres] running 'Niter' iterations is much more slower than applying 'Niter' times 'matvec' (or 'dot').
Each gmres outer iteration requires ~ `restart` matrix-vector products. restart=None means the default value, restart=20. The returned `info` contains the number of outer iterations.
Sorry for the naive question. Now completely clear. This means that by default gmres is not gmres(full). And the docstring of 'info' is a bit disturbing. So clearly the total of number of iterations is always: Niter = maxiter*restart. However, the only way to use gmres(full) is to set: 'maxiter=1' and 'restart=val'. Which is also a bit confusing. The matlab behavior seems clearer, no ? - if restart==None then gmres does not restart. - if maxiter!=None and restart==None then the maximum number of total iterations is maxiter (instead of restart*maxiter). Last, why not collect more information in info, as the residual history, the number of outer iterations, the number of inner iteration, etc. ? Is there a reason ? or just because nobody has added it ? Thanks for your times and your quick and clear answer. All the best, simon