On Fri, Jun 22, 2012 at 1:54 AM, Alexander Grayver <span dir="ltr"><<a href="mailto:agrayver@gfz-potsdam.de" target="_blank">agrayver@gfz-potsdam.de</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Barry,<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
In this case the application of the method is quite restricted since all practical least squares problems formulated in form of normal equations are solved with regularization, e.g.:<br>
<br>
(A'A + \lamba I)x = A'b<br>
</blockquote>
Yes it is restrictive. There is no concept of lambda in CGNE in PETSc<br>
</blockquote>
<br>
In this case, since there is LSQR in PETSc, there is hardly any reason to use CGNE.<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Assume I have A computed and use matrix free approach to represent (A'A + \lamba I) without ever forming it, so what should I do then to apply KSPCGNE?<br>
</blockquote>
    If you supply a shell matrix that applies (A'A + \lamba I)  why not just use KSPCG?<br>
</blockquote>
<br>
That is what I do at the moment. However, as far as I understand, CGLS is not just about shifting original matrix with some lambda, it has other advantages over CG for normal equations.<br></blockquote><div><br></div><div>
According to the CGLS website, you should use LSQR if lambda > 0. The value of negative shifts is not clear to me. It</div><div>looks like all these rely on the same trick (bidiagonalization) to avoid squaring the matrix and the condition number.</div>
<div><br></div><div>    Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
     But if you provide this shell matrix, how do you plan to apply a preconditioner?<br>
</blockquote>
<br>
One can easily compute diag(A'A + \lamba I), thanks to MatGetColumnNorms, and thus Jacobi is possible. Since the matrix is diagonally dominant, in my case it is enough to converge. Although convergence for normal equations does not imply accurate solution, so that one needs CGLS or LSQR.<span class="HOEnZb"><font color="#888888"><br>

<br>
-- <br>
Regards,<br>
Alexander<br>
<br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>
-- Norbert Wiener<br>