<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, Feb 17, 2014 at 5:14 PM, Jed Brown <span dir="ltr"><<a href="mailto:jed@jedbrown.org" target="_blank">jed@jedbrown.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="">Andrés Alessandro León Baldelli <<a href="mailto:a.leon.baldelli@gmail.com">a.leon.baldelli@gmail.com</a>> writes:<br>
<br>
> Hi all,<br>
> I am working with Blaise Bourdin on implementing a concept of “natural numbering” for unstructured meshes using DMplex.<br>
> Such natural numbering can be, e.g., that of the mesh prior to parallel distribution.<br>
> I have a working example in which I compute a field on the distributed DM and I scatter it back to the serial DM on rank0 but I would like to create a more general interface. To this regard I ask your advice:<br>
> 1) Is it reasonable to add an SF within the DM typedef for this "natural to global” scatter?<br>
<br>
</div>Surely you don't want the (necessarily non-scalable) serial DM to be a<br>
necessary part of this interface?  What do you want to do with this<br>
natural numbering?  Just write output files?<br>
</blockquote></div><br>Jed, No, no, no. This is not an SF for a serial DM.</div><div class="gmail_extra"><br></div><div class="gmail_extra">Imagine we start with a distributed mesh. The GlobalToNatural would scatter from the</div>
<div class="gmail_extra">PETSc ordering, determined by partitioning, to the original parallel ordering. Then that</div><div class="gmail_extra">"natural" vector can be output like normal. If you know something about that original</div>
<div class="gmail_extra">ordering I guess this helps (although I do not advocate that workflow).</div><div class="gmail_extra"><br></div><div class="gmail_extra">If we start with a serial mesh, we still calculate the SF, but it maps to a naive partition of</div>
<div class="gmail_extra">this initial mesh. This will require more code, since we need to actually do this partition,</div><div class="gmail_extra">but its not too bad.</div><div class="gmail_extra"><br></div><div class="gmail_extra">
    Matt<br clear="all"><div><br></div>-- <br>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener
</div></div>