[petsc-users] Matrix indexing for distributed DMPlex
Matthew Knepley
knepley at gmail.com
Fri Nov 6 20:16:49 CST 2015
On Fri, Nov 6, 2015 at 6:35 PM, Matthew Kury <mkury at berkeley.edu> wrote:
> Dear All,
>
> I have been trying to figure out how to appropriately index a matrix that
> was created from a DMPlex with a section defined for it.
>
> I created the matrix with DMCreateMatrix() and I tried to index the
> entries by using the ISLocalToGlobalMapping obtained from
> DMGetLocalToGlobalMapping, with the local indices being those obtained from
> PetscSectionGetOffset() with the appropriate points from the D.A.G. However
> this does not seem to work.
>
It should work. However, you can always get the global section using
DMGetDefaultGlobalSection() which directly gives global offsets,
although nonlocal offsets are stored as -(off+1).
> In particular, with the ISLocalToGlobalMapping, what I understand is that
> it gives the relationship of the local indexing to the global indexing,
> however there are negative numbers in this mapping which I fail to find an
> explanation of in the documentation. In addition, there do not appear to be
> redundant indexes to the global matrix as one would expect in a distributed
> DMPlex because there can be some of the same points on different
> processors.
>
Yes, the negative numbers are -(off+1) for nonlocal offsets. I am not sure
I understand your point about redundant offsets.
Thanks,
Matt
> Any help is greatly appreciated.
>
> Thank you for your time,
>
>
> Matthew W. Kury
> Ph.D. Candidate
> CMRL UC Berkeley
> M.S. Mechanical Engineering UC Berkeley, 2014
>
>
>
>
>
>
>
--
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/20151106/5d45b116/attachment-0001.html>
More information about the petsc-users
mailing list