[petsc-users] How can I get the global integer ids in a label?
leejearl
leejearl at mail.nwpu.edu.cn
Thu Dec 6 19:06:02 CST 2018
Hi Matt: Thank you for your helps. I want to implement the
periodic boundary in dmplex. For a cell or face, the donor cell or face
might be not distributed in the same local dm. Maybe I should ask that
howcan I implement the topology of the periodic boundary in
demplex. Thanks again for your kind reply.
leejearlOn Thu, 2018-12-06 at 12:02 -0500, Matthew Knepl
> On Thu, Dec 6, 2018 at 9:47 AM leejearl via petsc-users <
> petsc-users at mcs.anl.gov> wrote:
> > Hi, Petsc developer:
> >
> > I have a problem for helps.
> >
> > There is a dmplex object, and I have distribute it use the
> >
> > routine DMPlexDistribute(). Then, I want to get the global integer
> > ids
> >
> > in the label "Face Sets". The code is as follow,
> >
> >
> >
> > ierr = DMGetLabelIdIS(dm, "Face Sets", &bcIdIS);CHKERRQ(ierr);
> >
> >
> >
> > The values of bcIdIs are the local integer ids. How can I get the
> >
> > global integer ids.
> >
> >
> >
> > The problem also can be described as follow. The global ids might
> > look
> >
> > likes
> >
> >
> >
> > IS Object: 1 MPI processes
> >
> > type: general
> >
> > Number of indices in set 4
> >
> > 0 1
> >
> > 1 4
> >
> > 2 3
> >
> > 3 2
> >
> >
> >
> > But after the dm is distributed, I can only get the local ids as
> > follow
> >
> > using the routine "DMGetLabelIdIS"
> >
> >
> >
> > IS Object: 1 MPI processes
> >
> > type: general
> >
> > [0] Number of indices in set 3
> >
> > [0] 0 1
> >
> > [0] 1 2
> >
> > [0] 2 4
> >
> >
> >
> > How can I get the global integer ids in a label after the dm is
> >
> > distributed?
> >
> >
> >
> > Any helps are appreciate!
>
> You can make a conversion from local point numbers to global point
> numbers using
>
> https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/DMPLEX/DMPlexCreatePointNumbering.html
> You could even make a replacement DMLabel with the global point
> numbers, but I think the win would be smallor nonexistent for most
> cases.
> Thanks,
> Matt
> > Thanks
> >
> >
> >
> > leejearl
> >
> >
> >
> >
> >
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20181207/d9360635/attachment.html>
More information about the petsc-users
mailing list