[petsc-users] (no subject)

Matthew Knepley knepley at gmail.com
Fri Feb 21 19:48:40 CST 2014


On Fri, Feb 21, 2014 at 12:34 PM, Chung-Kan Huang <ckhuangf at gmail.com>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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20140221/db0a2491/attachment.html>


More information about the petsc-users mailing list