<html><head><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Here's a simplistic solution, but one which might provide the most users with what they're expecting, which I think is important for a component like DMStag.<div class=""><br class=""></div><div class="">It simply changes the behavior of the functions to set uniform coordinates to set all local coordinates, including ghosts, using linear extrapolation.</div><div class="">In the periodic case, that means that the redundant boundary coordinates are what you would expect (in this case, 2pi insteaf of 0).</div><div class=""><a href="https://gitlab.com/petsc/petsc/-/merge_requests/3804" class="">https://gitlab.com/petsc/petsc/-/merge_requests/3804</a></div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><div><blockquote type="cite" class=""><div class="">Am 01.04.2021 um 16:37 schrieb Jed Brown <<a href="mailto:jed@jedbrown.org" class="">jed@jedbrown.org</a>>:</div><br class="Apple-interchange-newline"><div class=""><div class="">Matthew Knepley <<a href="mailto:knepley@gmail.com" class="">knepley@gmail.com</a>> writes:<br class=""><br class=""><blockquote type="cite" class="">We use it to identify that the mesh is periodic and in what directions, and<br class="">use the length if we have to figure out the coordinates.<br class=""><br class=""><blockquote type="cite" class="">Jed may argue that he wants you to retain the far point and use L2G to<br class="">eliminate it, but that sounds like a lot more work.<br class=""><br class="">Computational work or implementation work?<br class=""><br class=""></blockquote><br class="">implementation.<br class=""></blockquote><br class="">I think this is more implicit DMPlex assumptions than a fundamental issue.<br class=""><br class=""><blockquote type="cite" class=""><blockquote type="cite" class="">I already have logic in DMStag to support something related, which was<br class="">required for L2G with INSERT_VALUES in the periodic, 1-rank case, where<br class="">multiple local points can respond to the same global point. So building the<br class="">local coordinates with the far point and then doing L2G doesn't sound bad<br class="">to implement, at least.<br class=""><br class=""><a href="https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/DMSTAG/DMStagPopulateLocalToGlobalInjective.html" class="">https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/DMSTAG/DMStagPopulateLocalToGlobalInjective.html</a><br class=""><br class=""></blockquote><br class="">That may work. It is a problem in Plex because that strategy destroys the<br class="">topological queries. However, it sounds like you do not have that problem.<br class=""></blockquote><br class="">Patrick, if you're still in early stages, I would encourage you to support nodally affine maps in the L2G, which allows things like rotated periodicity for vector-valued fields.<br class=""><br class=""><a href="https://gitlab.com/petsc/petsc/-/issues/566" class="">https://gitlab.com/petsc/petsc/-/issues/566</a><br class=""></div></div></blockquote></div><br class=""></div></body></html>