[petsc-users] Is it possible to keep track of original elements # after a call to DMPlexDistribute ?
Matthew Knepley
knepley at gmail.com
Wed Jul 14 14:09:40 CDT 2021
On Wed, Jul 14, 2021 at 1:18 PM Eric Chamberland <
Eric.Chamberland at giref.ulaval.ca> 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"...
>
You need to call
https://petsc.org/release/docs/manualpages/DM/DMSetUseNatural.html
before call DMPlexDistribute(). Then you can call
https://petsc.org/release/docs/manualpages/DMPLEX/DMPlexGlobalToNaturalBegin.html
to map back to the original numbering if you want. This is the same thing
that DMDA is doing.
Thanks,
Matt
> 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/20210714/08faf4df/attachment.html>
More information about the petsc-users
mailing list