[petsc-users] Ambiguity of KSPCGNE

Matthew Knepley knepley at gmail.com
Fri Jun 22 07:26:01 CDT 2012


On Fri, Jun 22, 2012 at 1:54 AM, Alexander Grayver
<agrayver at gfz-potsdam.de>wrote:

> Hi Barry,
>
>  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.:
>>>
>>> (A'A + \lamba I)x = A'b
>>>
>> Yes it is restrictive. There is no concept of lambda in CGNE in PETSc
>>
>
> In this case, since there is LSQR in PETSc, there is hardly any reason to
> use CGNE.
>
>  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?
>>>
>>    If you supply a shell matrix that applies (A'A + \lamba I)  why not
>> just use KSPCG?
>>
>
> 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.
>

According to the CGLS website, you should use LSQR if lambda > 0. The value
of negative shifts is not clear to me. It
looks like all these rely on the same trick (bidiagonalization) to avoid
squaring the matrix and the condition number.

    Matt


>      But if you provide this shell matrix, how do you plan to apply a
>> preconditioner?
>>
>
> 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.
>
> --
> Regards,
> Alexander
>
>


-- 
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which their
experiments lead.
-- Norbert Wiener
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20120622/21834000/attachment.html>


More information about the petsc-users mailing list