On Fri, Feb 21, 2014 at 12:34 PM, Chung-Kan Huang <[email protected]>wrote:
> 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? > It sounds like you should just use MatSetValues() since we have no idea what L* and U* are. Matt > Thanks, > > > Kan > -- 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
