<div dir="ltr"><div dir="ltr">On Fri, Nov 26, 2021 at 12:49 AM 袁煕 <<a href="mailto:yuanxi@advancesoft.jp">yuanxi@advancesoft.jp</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"><div dir="ltr">Dear PETSc-team,<div><br></div><div>When the mesh is distributed, the vertices are renumbered and some vertices are shared by neighboring CPUs. My question is:<br></div><div><br></div><div>1. How to check which vertice is a ghost one?</div></div></blockquote><div><br></div><div>It is present in the PetscSF describing the connections between local meshes. So you would do</div><div><br></div><div> DMGetPointSF(dm, &sf);</div><div> PetscSFGetGraph(sf, NULL, &Nl, &leaves, NULL);</div><div><br></div><div>If your point in the list 'leaves' of length Nl, then it is a ghost.</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"><div dir="ltr"><div>2. Are those ghost vertices always at the end of vertices list? If not</div></div></blockquote><div><br></div><div>No.</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"><div dir="ltr"><div>3. Are there simple ways to let those ghost vertices come after owned ones?</div></div></blockquote><div><br></div><div>You can introduce a permutation of the points when numbering unknowns. This is what Barry does in his branch.</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"><div dir="ltr"><div>Many thanks</div><div><br></div><div>Yuan</div></div>
</blockquote></div><br clear="all"><div><br></div>-- <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>