[petsc-users] How to use DMPlex_Distribute(_Overlap) without redistribution of the mesh

Matthew Knepley knepley at gmail.com
Wed Oct 2 10:44:01 CDT 2019


On Wed, Oct 2, 2019 at 10:02 AM Fabian.Jakub <
Fabian.Jakub at physik.uni-muenchen.de> wrote:

> Hi Matt,
> I see now that it does not have anything to do with the overlap, it is
> just the distribute itself.
>
> I attach two images with the cell ownership of the mesh on four ranks.
> Once before and once after the distribute call.
>
> I guess this comes from the way in which I generate the mesh.
> I start with a 2D triangle mesh horizontally, which is distributed.
> After that, I extrude the mesh vertically.
>
> Now it seems that the partitioner deems a different partitioning better
> for the 3D mesh.
>
> Can I prevent DMPlexDistribute to do that?
>

So you want Distribute to somehow keep together columns? I see at least
three ways to do this, all of which
involve some coding:

1) Code your own partitioner: Distribute() just takes input from a
PetscPartitioner, so you could make your own
    that did completely what you want.

2) GIve edge weights to ParMetis: Calculating the weights would involve
determining which cells were vertical
     neighbors, which would involve writing some code.

3) Partition a 2D mesh: This is like 1) since you could implement it this
way:

    a) Pull off the top surface as a submesh (not hard)

    b) Partition it (not hard)

    c) Compute a partition of the 3D mesh based on the 2D partition (as
hard as 2)

  Thanks,

     Matt


> Many Thanks,
> Fabian
>
>
> On 10/2/19 12:19 PM, Matthew Knepley wrote:
> > On Tue, Oct 1, 2019 at 7:39 PM Fabian.Jakub via petsc-users <
> > petsc-users at mcs.anl.gov> wrote:
> >
> >> Dear Petsc team,
> >> dear Matt,
> >>
> >> I have a 3D, distributed DMPlex with 0 overlap in FVM adjacency.
> >> Now, I would like to add overlap but not change the local portions.
> >> I was wondering if you could suggest how to do that best/easiest.
> >>
> >> My problem is that just using DMPlexDistribute changes the partitioning,
> >> i.e. cells change owners.
> >>
> >> I guess I could trace the steps you took in
> >> DMPlexDistributeOverlap
> >>
> >
> > DistributeOverlap() should not change the partition. Are you sure it
> does?
> > I think you just call that.
> >
> >   Thanks,
> >
> >     Matt
> >
> >
> >> and the following stuff you have in
> >> DMPlexDistribute() { if overlap > 0 }
> >>
> >> Another thought was to use a custom partitioner so as not to change the
> >> local layouts. Is this a good idea?
> >>
> >> In case that you suggest to go for first steps (the duplication of the
> >> DMPlexDistributeOverlap stuff) could you add a fortran stub for it?
> >>
> >> Many thanks,
> >>
> >> Fabian
> >>
> >
> >
>
>

-- 
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/20191002/d865040d/attachment.html>


More information about the petsc-users mailing list