[petsc-users] Ambiguity of KSPCGNE

Barry Smith bsmith at mcs.anl.gov
Thu Jun 21 17:32:48 CDT 2012


On Jun 20, 2012, at 10:43 AM, Alexander Grayver wrote:

> Hello,
> 
> I'm a bit confused about the KSPCGNE. First of all, is CGLS^1 and implemented CGNE are the same (or I mix it up with CGNR)? I don't know what notation is more classical, but CGLS seems to be more common. 
> It is claimed:

It is the same as this:  http://www.stanford.edu/group/SOL/software/cgls.html


> 
> Applies the preconditioned conjugate gradient method to the normal equations without explicitly forming A^t*A 
> 
> Does that mean I have to provide A to KSP?

    Yes you provide A.

> 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

> 
> 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? 

    But if you provide this shell matrix, how do you plan to apply a preconditioner?

   Barry


> 
> Thanks.
> 
> 1. Bjorck, A., 1996. Numerical Methods for Least Squares Problems, p. 288
> -- 
> Regards,
> Alexander
> 



More information about the petsc-users mailing list