Dominique Orban dominique.orban@gmail....
Thu Feb 25 11:53:37 CST 2010

```On Thu, Feb 25, 2010 at 5:38 PM, <scipy-user-request@scipy.org> wrote:

>
> ---------- Forwarded message ----------
> From: Jake VanderPlas <jakevdp@gmail.com>
> To: scipy-user@scipy.org
> Date: Tue, 23 Feb 2010 11:14:53 -0800
> Subject: [SciPy-User] preconditioned conjugate gradient
> Hello,
> I'm looking for a method to solve a sparse linear equation A*x=b,
> where A is a NxN symmetric scipy.sparse.LinearOperator object, and b
> is a 1D numpy vector.  The obvious choice would be something like
> scipy.sparse.linalg.cg.  The problem is, the condition number of A is
> very large - on order of 10^26.  From a search through relevant
> literature, I know that matlab's preconditioned conjugate gradient
> (pcg) routine works well for the type of problem I'm dealing with.  Is
> there any similar routine in scipy?
> I've looked at scipy.sparse.linalg.eigen.lobpcg, which seems to be
> along the lines of what I need.  I could use this to find the inverse,
> but that would involve computing an NxN dense matrix of eigenvectors,
> which will cause memory problems in my case.  Any help would be
> appreciated!
>   -Jake
>

Note that your matrix A must also be (positive or negative) definite, or the
conjugate gradient method may break down. If A is indefinite, you will
probably be safer with MINRES, CRAIG or SYMMLQ. As another reader pointed
out, you still need to supply a good preconditioner. Often, the application
suggests the kind of preconditioner that works well.

--
Dominique
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/scipy-user/attachments/20100225/24f9c32b/attachment.html
```