Hello,

In my application I like to use
PetscErrorCode  KSPSetOperators(KSP ksp,Mat Amat,Mat Pmat,MatStructure flag)
and have Pmat different from Amat

if Amat = L + D + U
then Pmat  = Amat  - L* - U* + rowsum(L* + U*)
where L* and U* is a portion of L and U and rowsum(L* + U*) will add into D

I know I can explicitly construct Pmat step-by-step but wonder what will be
the most easy way to do this in PETSC?

Thanks,


Kan

Reply via email to