<div dir="ltr"><div>Hello,</div><div><br></div><div>In my application I like to use </div><div><div>PetscErrorCode  KSPSetOperators(KSP ksp,Mat Amat,Mat Pmat,MatStructure flag)<br clear="all"></div></div><div>and have Pmat different from Amat</div>
<div><br></div><div>if Amat = L + D + U</div><div>then Pmat  = Amat  - L* - U* + rowsum(L* + U*)</div><div>where L* and U* is a portion of L and U and rowsum(L* + U*) will add into D</div><div><br></div><div>I know I can explicitly construct Pmat step-by-step but wonder what will be the most easy way to do this in PETSC?</div>
<div><br></div><div>Thanks,</div><div><br></div><div><br></div><div>Kan<br></div><p><br></p>
</div>