[petsc-dev] Using PETSc MatIS, how to get local matrix (= one domain) before and after assembly ?
Stefano Zampini
stefano.zampini at gmail.com
Sun May 21 15:51:34 CDT 2017
To assemble the operator in aij format, use
MatISGetMPIXAIJ
http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Mat/MatISGetMPIXAIJ.html
Il 21 Mag 2017 18:43, "Matthew Knepley" <knepley at gmail.com> ha scritto:
> 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-dev/attachments/20170521/4d478215/attachment.html>
More information about the petsc-dev
mailing list