[petsc-users] Is it possible to keep track of original elements # after a call to DMPlexDistribute ?
Matthew Knepley
knepley at gmail.com
Wed Sep 29 18:39:08 CDT 2021
On Wed, Sep 29, 2021 at 5:18 PM Eric Chamberland <
Eric.Chamberland at giref.ulaval.ca> wrote:
> Hi,
>
> I come back with _almost_ the original question:
>
> I would like to add an integer information (*our* original element
> number, not petsc one) on each element of the DMPlex I create with
> DMPlexBuildFromCellListParallel.
>
> I would like this interger to be distribruted by or the same way
> DMPlexDistribute distribute the mesh.
>
> Is it possible to do this?
>
I think we already have support for what you want. If you call
https://petsc.org/main/docs/manualpages/DM/DMSetUseNatural.html
before DMPlexDistribute(), it will compute a PetscSF encoding the global to
natural map. You
can get it with
https://petsc.org/main/docs/manualpages/DMPLEX/DMPlexGetGlobalToNaturalSF.html
and use it with
https://petsc.org/main/docs/manualpages/DMPLEX/DMPlexGlobalToNaturalBegin.html
Is this sufficient?
Thanks,
Matt
> Thanks,
>
> Eric
>
> On 2021-07-14 1:18 p.m., Eric Chamberland wrote:
> > Hi,
> >
> > I want to use DMPlexDistribute from PETSc for computing overlapping
> > and play with the different partitioners supported.
> >
> > However, after calling DMPlexDistribute, I noticed the elements are
> > renumbered and then the original number is lost.
> >
> > What would be the best way to keep track of the element renumbering?
> >
> > a) Adding an optional parameter to let the user retrieve a vector or
> > "IS" giving the old number?
> >
> > b) Adding a DMLabel (seems a wrong good solution)
> >
> > c) Other idea?
> >
> > Of course, I don't want to loose performances with the need of this
> > "mapping"...
> >
> > Thanks,
> >
> > Eric
> >
> --
> Eric Chamberland, ing., M. Ing
> Professionnel de recherche
> GIREF/Université Laval
> (418) 656-2131 poste 41 22 42
>
>
--
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
https://www.cse.buffalo.edu/~knepley/ <http://www.cse.buffalo.edu/~knepley/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20210929/169879f8/attachment.html>
More information about the petsc-users
mailing list