[petsc-dev] Problem with conjugate gradient solver

Anush Krishnan anush at bu.edu
Thu Aug 26 12:07:45 CDT 2010


> Message: 2
> Date: Tue, 24 Aug 2010 10:56:53 -0500
> From: Barry Smith <bsmith at mcs.anl.gov>
> Subject: Re: [petsc-dev] Problem with conjugate gradient solver
> To: For users of the development version of PETSc
>        <petsc-dev at mcs.anl.gov>,        Victor Eijkhout <
> eijkhout at tacc.utexas.edu>
> Message-ID: <A4C6A1ED-CDE7-4653-8046-C2797AD5AF31 at mcs.anl.gov>
> Content-Type: text/plain; charset="us-ascii"
>
>
>   Well you are doing nothing wrong. When I run the code I get the same
> results as you. I dump the matrix into Matlab and it has a negative
> eigenvalue so the example is wrong. The code is handling it correctly.
>
> >> eig(full(Mat_0))
>
> ans =
>
>   -0.8042
>    0.1716
>    0.6489
>    1.0000
>    1.0000
>    1.0000
>    1.0000
>

So are you saying that trying to solve the system of equations in the
example will always result in divergence? I tried the same program with a
different system that I know has a solution, and even that diverges. I get a
proper solution if I use the default KSP solver.

Anush


>
>   I am cc:iing Victor who supposedly wrote the original example.
>

>   Barry
>
> Attached is the matrix saved with -mat_view_matlab
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20100826/f67ac466/attachment.html>


More information about the petsc-dev mailing list