Number of iterations of the CG method

Matthew Knepley knepley at gmail.com
Fri Jan 25 17:35:04 CST 2008


This sounds like the stopping criteria are different.

  Matt

On Jan 25, 2008 5:28 PM, USUARIO INICIAL <ronanrmo at ig.com.br> wrote:
> I have a conjugate gradient implemented in C without Petsc and when I
> solve the linear system of my problem (an elliptic pde) it converges
> with something about 270 iterations. But with Petsc (ksp_type cg
> pc_type none) the same linear system converges with 510 iterations.
>
> Do someone have any idea why is that happenning?
>
> I already checked the matrix and they are equal. The results are quite
> close and I set the same tolerance to both methods (setting rtol on
> petsc to a very small number, to use only atol). And besides the
> number of iterations, the time spent by petsc is not much more than
> the other method.
>
> Thanks,
> Ronan
>
> I'm sorry, I dont know english very well, I did the best I could.
>
>



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




More information about the petsc-users mailing list