[petsc-users] CG with right preconditioning supports NONE norm type only
Barry Smith
bsmith at mcs.anl.gov
Thu Mar 9 11:01:11 CST 2017
> On Mar 9, 2017, at 1:49 AM, Klaij, Christiaan <C.Klaij at marin.nl> wrote:
>
> Barry,
>
> I came across the same problem and decided to use KSPSetNormType
> instead of KSPSetPCSide. Do I understand correctly that CG with
> KSP_NORM_UNPRECONDITIONED would be as efficient as with
> KSP_NORM_PRECONDITIONED?
Yes, it as efficient.
> Since PC_RIGHT is not supported, I was
> under the impression that the former would basically be the
> latter with an additional true residual evaluation for the
> convergence monitor, which would be less efficient.
It is true for GMRES with left preconditioning (but not right) that computing the unpreconditioned residual norm adds a good amount of additional work but it is not true for CG, this is because CG, by its nature tracks both y = A x and B y so either is equally available to compute its norm. GMRES with left preconditioner computes B A something at each iteration but doesn't directly compute the residual (either preconditioned or not) it uses a recursive formula for the residual norm.
>
> Chris
>
>> On Mar 8, 2017, at 10:47 AM, Kong, Fande <fande.kong at inl.gov> wrote:
>>
>> Thanks Barry,
>>
>> We are using "KSPSetPCSide(ksp, pcside)" in the code. I just tried "-ksp_pc_side right", and petsc did not error out.
>>
>> I like to understand why CG does not work with right preconditioning? Mathematically, the right preconditioning does not make sense?
>
> No, mathematically it makes sense to do it on the right. It is just that the PETSc code was never written to support it on the right. One reason is that CG is interesting that you can run with the true residual or the preconditioned residual with left preconditioning, hence less incentive to ever bother writing it to support right preconditioning. For completeness we should support right as well as symmetric.
>
> Barry
>
>
> dr. ir. Christiaan Klaij | Senior Researcher | Research & Development
> MARIN | T +31 317 49 33 44 | mailto:C.Klaij at marin.nl | http://www.marin.nl
>
> MARIN news: http://www.marin.nl/web/News/News-items/Your-future-is-Blue-Blueweek-April-1013.htm
>
More information about the petsc-users
mailing list