[petsc-users] Is there a partition section in a distributed DM object?

Matthew Knepley knepley at gmail.com
Fri Jan 26 09:41:37 CST 2018

On Wed, Jan 24, 2018 at 3:17 PM, Jordan Wagner <j.wagner at rice.edu> wrote:

> Hi,
> At some point, I would like to export my distributed DM along with an
> associated scalar field corresponding to the process rank for which each
> point is owned. I know that what I need is the partition section, which is
> more or less identical to Fig. 6 in Knepley and Karpeev (2009). I was
> wondering if this particular section is already made behind the scenes when
> distributing and just hiding somewhere in the DM object.
> I know it shouldn't be difficult to just make the section myself, but it
> seems like something that would be needed a lot and already made. I haven't
> been successful in finding it, so I just wanted to make sure I am not
> missing anything.

We do not keep the partitioning around, since you do not need it after it
is used. Second, it is stored as a PetscSection+IS, which is the inverse of
what you want.
I would just make a Vec with the rank. It should also be possible to use an
IS, but I am not sure parallel I/O is completely right for IS whereas I
know everything
works for Vec.



> Thanks very much
> jw

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.caam.rice.edu/~mk51/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20180127/de46e204/attachment.html>

More information about the petsc-users mailing list