[petsc-users] [petsc-dev] Using PETSc MatIS, how to get local matrix (= one domain) before and after assembly ?

Matthew Knepley knepley at gmail.com
Sun May 21 11:42:59 CDT 2017


On Sun, May 21, 2017 at 11:23 AM, Franck Houssen <franck.houssen at inria.fr>
wrote:

> I have a 3x3 global matrix is built (diag: 1, 2, 1): it's made of 2
> overlapping 2x2 local matrix (diag: 1, 1).
> Getting non assembled local matrix is OK with MatISGetLocalMat.
> How to get assembled local matrix (initial local matrix + neigbhor
> contributions on the borders) ? (expected result is diag: 2, 1)
>

You can always use

http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Mat/MatGetSubMatrix.html
http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Mat/MatGetSubMatrices.html

to get copies, but if you just want to build things, you can use

http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Mat/MatGetLocalSubMatrix.html

  Thanks,

     Matt


> Franck
>



-- 
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

http://www.caam.rice.edu/~mk51/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20170521/2fbf9267/attachment.html>


More information about the petsc-users mailing list