[petsc-users] left and right preconditioners

Barry Smith bsmith at mcs.anl.gov
Sun May 23 13:13:59 CDT 2010


   The PETSc Krylov methods are not coded to take directly both a left and right preconditioner. Therefor the way to use both left and right preconditioning together is to "fake" it by using a Mat that actually applies right preconditioner followed by the operator followed by the left preconditioner. 

    Take a look at src/ksp/pc/impls/eisen/eisen.c and mimic that code. (basically copy all the subroutines and in that file and modify each one to your specific needs.)

    Barry

On May 23, 2010, at 1:01 PM, hxie at umn.edu wrote:

> Hi,
> 
> I want to use both left and right preconditioners for a linear system. Both the preconditioners are based on part of the matrix. How can I implement it? I can construct the preconditioner matrices. Thanks.
> 
> Bests,
> Hui 



More information about the petsc-users mailing list