<div dir="ltr"><div dir="ltr">On Mon, Jan 22, 2024 at 10:49 AM Berend van Wachem <<a href="mailto:berend.vanwachem@ovgu.de">berend.vanwachem@ovgu.de</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Dear Petsc-Team,<br>
<br>
Is there a good way to define a unique integer number in each element <br>
(e.g. a cell) of a DMPlex mesh, which is in the same location, <br>
regardless of the number of processors or the distribution of the mesh <br>
over the processors?<br>
<br>
So, for instance, if I have a DMPlex box mesh, the top-right-front <br>
corner element (e.g. cell) will always have the same unique number, <br>
regardless of the number of processors the mesh is distributed over?<br>
<br>
I want to be able to link the results I have achieved with a mesh from <br>
DMPlex on a certain number of cores to the same mesh from a DMPlex on a <br>
different number of cores.<br>
<br>
Of course, I could make a tree based on the distance of each element to <br>
a certain point (based on the X,Y,Z co-ordinates of the element), and go <br>
through this tree in the same way and define an integer based on this, <br>
but that seems rather cumbersome.<br></blockquote><div><br></div><div>I think this is harder than it sounds. The distance will not work because it can be very degenerate.</div><div>You could lexicographically sort the coordinates, but this is hard in parallel. It is fine if you are willing</div><div>to gather everything on one process. You could put down a p4est, use the Morton order to number them since this is stable for a given refinement. And then within each box lexicographically sort the centroids. This is definitely cumbersome, but I cannot think of anything else. This also might have parallel problems since you need to know how much overlap you need to fill each box.</div><div><br></div><div> Thanks,</div><div><br></div><div> Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Thanks and best regards, Berend.</blockquote></div><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div>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><br></div><div><a href="http://www.cse.buffalo.edu/~knepley/" target="_blank">https://www.cse.buffalo.edu/~knepley/</a><br></div></div></div></div></div></div></div></div>