<div dir="ltr">What do you mean by "I always get the first numbering"?<div>I understand you are using GMSH right? To have PETSc read the periodic section of the .msh file, you need to pass -dm_plex_gmsh_periodic</div><div>Note that DMLocalizeCoordinates will localize coordinates ONLY if you use DMSetPerioidicity(), which is done in the GMSH reader</div></div><br><div class="gmail_quote"><div dir="ltr">Il giorno mer 12 dic 2018 alle ore 17:17 Artur Palha Da Silva Clérigo - LR via petsc-users <<a href="mailto:petsc-users@mcs.anl.gov">petsc-users@mcs.anl.gov</a>> ha scritto:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div style="overflow-wrap: break-word;">
<br>
<div><br>
<blockquote type="cite">
<div>On 12 Dec 2018, at 15:14, Matthew Knepley <<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a>> wrote:</div>
<br class="gmail-m_8585104034508813738Apple-interchange-newline">
<div>
<div dir="ltr">
<div class="gmail_quote">
<div dir="ltr">On Wed, Dec 12, 2018 at 9:12 AM Artur Palha Da Silva Clérigo - LR <<a href="mailto:A.PalhaDaSilvaClerigo@tudelft.nl" target="_blank">A.PalhaDaSilvaClerigo@tudelft.nl</a>> wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div style="overflow-wrap: break-word;">Dear Matt,
<div><br>
</div>
<div>Thank you for your quick reply. As for your question: "why would there be a difference? They should be numbered in the same way.”</div>
<div><br>
</div>
<div>I see the degrees of freedom living on the periodic domain as the ones living at boundaries between interior elements. This is what I expect for non-periodic domain for nodal scalar field:</div>
<div><br>
</div>
<div>Non-periodic:</div>
<div><br>
</div>
<div>1 3 5</div>
<div>X-------------X-------------X</div>
<div>| | |</div>
<div>| | |</div>
<div>| | |<br>
<div>X-------------X-------------X</div>
<div>0 2 4</div>
<div><br>
</div>
<div>Periodic (vertical boundaries, topologically, the domain is a cylinder)</div>
<div><br>
</div>
<div>
<div>1 3 1</div>
<div>X-------------X-------------X</div>
<div>| | |</div>
<div>| | |</div>
<div>| | |<br>
<div>X-------------X-------------X</div>
<div>0 2 0</div>
</div>
</div>
<div><br>
</div>
<div>This is not the expected behaviour?</div>
</div>
</div>
</blockquote>
<div><br>
</div>
<div>What I mean is that each vertex in the periodic domain gets 1 dof. Same procedure as non-periodic.</div>
<div>We do not duplicate vertices or anything like that.</div>
</div>
</div>
</div>
</blockquote>
<div><br>
</div>
<div>Yes, I agree. That happens yes. What I meant was that for both the periodic and non-periodic case I always get the first numbering. Is this because I miss DMLocalizeCoordinates?</div>
<div><br>
</div>
<div><br>
</div>
<br>
<blockquote type="cite">
<div>
<div dir="ltr">
<div class="gmail_quote">
<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 style="overflow-wrap: break-word;">
<div>
<div>Once again thank you for your help.</div>
<div><br>
</div>
<div>-artur palha</div>
<div><br>
<blockquote type="cite">
<div>On 12 Dec 2018, at 15:04, Matthew Knepley <<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a>> wrote:</div>
<br class="gmail-m_8585104034508813738m_7438610902563618406Apple-interchange-newline">
<div>
<div dir="ltr">
<div class="gmail_quote">
<div dir="ltr">On Wed, Dec 12, 2018 at 9:01 AM Artur Palha Da Silva Clérigo - LR via petsc-users <<a href="mailto:petsc-users@mcs.anl.gov" target="_blank">petsc-users@mcs.anl.gov</a>> wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div style="overflow-wrap: break-word;">Dear All,
<div><br>
</div>
<div>I having been trying to add periodic domain functionality to my code. I am able to generate a periodic mesh with gmsh and load it using dmplex. The problem is that I am unable to have a numbering of the degrees of freedom that reflects the periodicity
(they are numbered as if there was no periodicity).</div>
</div>
</blockquote>
<div><br>
</div>
<div>Why would there be a difference? They should be numbered in the same way.</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 style="overflow-wrap: break-word;">
<div>I read this thread: <a href="https://lists.mcs.anl.gov/mailman/htdig/petsc-users/2018-October/036539.html" target="_blank">https://lists.mcs.anl.gov/mailman/htdig/petsc-users/2018-October/036539.html</a></div>
<div><br>
</div>
<div>There it is mentioned that DMLocalizeCoordinates is required after loading the mesh.</div>
</div>
</blockquote>
<div><br>
</div>
<div>Yes, this makes cell-wise coordinates, which have a jump at the periodic boundary.</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 style="overflow-wrap: break-word;">
<div>My questions are the following:</div>
<div><br>
</div>
<div>1. Is it correct that I need to run DMLocalizeCoordinates on my DM?</div>
</div>
</blockquote>
<div><br>
</div>
<div>Yes.</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 style="overflow-wrap: break-word;">
<div>2. I am currently using petsc4py but I am unable to find DMLocalizeCoordinates. Is this functionality missing or is there an alternative to it?\</div>
</div>
</blockquote>
<div><br>
</div>
<div>Its possible no wrapper has been written for this yet. Lisandro, is it missing? (I am at a meeting, or I would check).</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 style="overflow-wrap: break-word;">
<div>Thank you for your time.</div>
<div><br>
</div>
<div>Kind regards,</div>
<div><br>
</div>
<div>-artur palha</div>
</div>
</blockquote>
</div>
<br clear="all">
<div><br>
</div>
-- <br>
<div dir="ltr" class="gmail-m_8585104034508813738m_7438610902563618406gmail_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>
</div>
</blockquote>
</div>
<br>
</div>
</div>
</blockquote>
</div>
<br clear="all">
<div><br>
</div>
-- <br>
<div dir="ltr" class="gmail-m_8585104034508813738gmail_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>
</div>
</blockquote>
</div>
<br>
</div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature">Stefano</div>