[petsc-users] interpreting results of ISLocalToGlobalMappingView
Wang
quanwang.us at gmail.com
Sun Jun 4 19:08:59 CDT 2017
Hello. I have some confusions about the results given
by ISLocalToGlobalMappingView.
After reading a simple mesh and associate each vertex with a scalar dof,
the test code uses DMPlexDistribute to get a distributed dm. Then I use the
following calls
call DMGetLocalToGlobalMapping(dm,ltog,ierr)
call ISLocalToGlobalMappingView(ltog, PETSC_VIEWER_STDOUT_WORLD, ierr);
and get following results for l2g. (MatGetOwnershipRange gives [0 3] for
rank 0 and [3 9] for rank 1)
ISLocalToGlobalMapping Object: 2 MPI processes
type: basic
[0] 0 0
[0] 1 1
[0] 2 5
[0] 3 2
[0] 4 6
[0] 5 8
[1] 0 3
[1] 1 4
[1] 2 5
[1] 3 6
[1] 4 7
[1] 5 8
The question is why, on rank 0, the global indices (I assume the third
column) are not grouped into local chunks and ghost chunks. I understand
how to do local to global mapping without any concern of the actual
ordering, but I have some impression that in PETSC the ghost information is
always coming later in the local vector.
In this case, on rank 0, global index 5 should appear later than 0,1,2,
because it is ghost vertex for rank 0.
I'm not trying to use this for FEM, but instead using the mesh management
in dmplex for other tasks. So I need to know more details.
Thank you.
QW
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20170604/034f3f5c/attachment.html>
More information about the petsc-users
mailing list