[petsc-users] How can I get the global integer ids in a label?
leejearl
leejearl at mail.nwpu.edu.cn
Thu Dec 6 21:14:32 CST 2018
Hi, Matt: Thank you for your helps. The exodus file which I used
is generated by PointWise. I should try to make sure whether I can get
a periodic topology using PointWise.Can you point me out which software
can generate an exodus file with periodic topology? Thanks.
leejearlOn Thu, 2018-12-06 at 22:07 -0500, Matthew Knepley wrote:
> On Thu, Dec 6, 2018 at 9:53 PM leejearl <leejearl at mail.nwpu.edu.cn>
> wrote:
> > Hi, Matt:
> > I find that the periodic boundary is specified in the following
> > way
> >
> > DMPlexCreateBoxMesh(comm, dim, user->simplex, user->cells, NULL,
> > NULL, user->periodicity, interpolate, dm).If I use an exo file, how
> > does the periodicity is specified?
> If your exodus file does not already have a periodic topology, I
> have no way
> of doing this. GMsh has periodicity in its format, so we support
> reading that inand fixing the topology.
> Thanks,
> Matt
> > Thanks
> >
> > Leejearl
> > On Thu, 2018-12-06 at 21:42 -0500, Matthew Knepley wrote:
> > > Yes
> > > Matt
> > >
> > > On Thu, Dec 6, 2018 at 9:28 PM leejearl <
> > > leejearl at mail.nwpu.edu.cn> wrote:
> > > > Hi Matt:
> > > > > > My mesh file is "*.exo". Can it works
> > > > > > fineDMPlexCreateBoxMesh_Simplex_Internal?
> > > > Thanks.
> > > > leejearl
> > > >
> > > > On Thu, 2018-12-06 at 21:20 -0500, Matthew Knepley wrote:
> > > > > On Thu, Dec 6, 2018 at 9:08 PM leejearl <
> > > > > leejearl at mail.nwpu.edu.cn> wrote:
> > > > > > Hi, Matt:
> > > > > > Is the code in following page?
> > > > > >
> > > > > > /petsc-master/src/snes/examples/tutorials/ex12.c.html
> > > > >
> > > > >
https://www.mcs.anl.gov/petsc/petsc-current/src/snes/examples/tutorials/ex12.c.html
> > > > >
> > > > > Matt
> > > > > > Thanks
> > > > > > leejearl
> > > > > >
> > > > > > On Thu, 2018-12-06 at 20:26 -0500, Matthew Knepley wrote:
> > > > > > > On Thu, Dec 6, 2018 at 8:06 PM leejearl <
> > > > > > > leejearl at mail.nwpu.edu.cn> wrote:
> > > > > > > > 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 how
> > > > > > > > can I implement the topology of the periodic boundary
> > > > > > > > in demplex.
> > > > > > >
> > > > > > > Plex directly encodes a periodic topology. For example,
> > > > > > > with a circle, each vertex is connectedto two neighbors.
> > > > > > > There are example with periodic boundary conditions like
> > > > > > > SNES ex12.
> > > > > > > Thanks,
> > > > > > > Matt
> > > > > > > > Thanks again for your kind reply.
> > > > > > > >
> > > > > > > > leejearl
> > > > > > > > On 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/50813829/attachment.html>
More information about the petsc-users
mailing list