<div dir="ltr"><div class="gmail_quote"><div dir="ltr">On Thu, Dec 6, 2018 at 9:53 PM leejearl <<a href="mailto:leejearl@mail.nwpu.edu.cn">leejearl@mail.nwpu.edu.cn</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="text-align:left;direction:ltr"><div>Hi, Matt:</div><div>        I find that the periodic boundary is specified in the following way</div><div><br></div><div><pre width="80" style="color:rgb(0,0,0);font-variant-ligatures:normal"><a href="https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/DMPLEX/DMPlexCreateBoxMesh.html#DMPlexCreateBoxMesh" target="_blank">DMPlexCreateBoxMesh</a>(comm, dim, user->simplex, user->cells, NULL, NULL, user->periodicity, interpolate, dm).</pre><pre width="80" style="color:rgb(0,0,0);font-variant-ligatures:normal">If I use an exo file, how does the periodicity is specified? </pre></div></div></blockquote><div>If your exodus file does not already have a periodic topology, I have  no way<br></div><div>of doing this. GMsh has periodicity in its format, so we support reading that in</div><div>and fixing the topology.</div><div><br></div><div>  Thanks,</div><div><br></div><div>   Matt</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="text-align:left;direction:ltr"><div><pre width="80" style="color:rgb(0,0,0);font-variant-ligatures:normal">Thanks </pre></div><div><br></div><div>Leejearl</div><div>On Thu, 2018-12-06 at 21:42 -0500, Matthew Knepley wrote:</div><blockquote type="cite" style="margin:0 0 0 .8ex;border-left:2px #729fcf solid;padding-left:1ex"><div dir="ltr">Yes<div><br></div><div>   Matt</div></div><br><div class="gmail_quote"><div dir="ltr">On Thu, Dec 6, 2018 at 9:28 PM leejearl <<a href="mailto:leejearl@mail.nwpu.edu.cn" target="_blank">leejearl@mail.nwpu.edu.cn</a>> wrote:<br></div><blockquote type="cite" style="margin:0 0 0 .8ex;border-left:2px #729fcf solid;padding-left:1ex"><div style="text-align:left;direction:ltr"><div>Hi Matt:</div><div>> >      My mesh file is "*.exo". Can it works<br>> > fineDMPlexCreateBoxMesh_Simplex_Internal?</div><div>        Thanks.</div><div>leejearl</div><div><br></div><div>On Thu, 2018-12-06 at 21:20 -0500, Matthew Knepley wrote:</div><blockquote type="cite" style="margin:0 0 0 .8ex;border-left:2px #729fcf solid;padding-left:1ex"><div dir="ltr"><div dir="ltr"><div class="gmail_quote"><div dir="ltr">On Thu, Dec 6, 2018 at 9:08 PM leejearl <<a href="mailto:leejearl@mail.nwpu.edu.cn" target="_blank">leejearl@mail.nwpu.edu.cn</a>> wrote:<br></div><blockquote type="cite" style="margin:0 0 0 .8ex;border-left:2px #729fcf solid;padding-left:1ex"><div style="text-align:left;direction:ltr"><div>Hi, Matt:</div><div>   Is the code in following page?</div><div><br></div><div>  /petsc-master/src/snes/examples/tutorials/ex12.c.html</div></div><br></blockquote><div><br></div><div><a href="https://www.mcs.anl.gov/petsc/petsc-current/src/snes/examples/tutorials/ex12.c.html" target="_blank">https://www.mcs.anl.gov/petsc/petsc-current/src/snes/examples/tutorials/ex12.c.html</a><br></div><div><br></div><div>  Matt</div><div> </div><blockquote type="cite" style="margin:0 0 0 .8ex;border-left:2px #729fcf solid;padding-left:1ex"><div style="text-align:left;direction:ltr"><div>      Thanks</div><div>leejearl</div><div><br></div><div>On Thu, 2018-12-06 at 20:26 -0500, Matthew Knepley wrote:</div><blockquote type="cite" style="margin:0 0 0 .8ex;border-left:2px #729fcf solid;padding-left:1ex"><div dir="ltr"><div class="gmail_quote"><div dir="ltr">On Thu, Dec 6, 2018 at 8:06 PM leejearl <<a href="mailto:leejearl@mail.nwpu.edu.cn" target="_blank">leejearl@mail.nwpu.edu.cn</a>> wrote:<br></div><blockquote type="cite" style="margin:0 0 0 .8ex;border-left:2px #729fcf solid;padding-left:1ex"><div style="text-align:left;direction:ltr"><div>Hi Matt:</div><div>       Thank you for your helps. I want to implement the periodic boundary in dmplex. For a cell or face, the donor cell or face might be not distributed in the same local dm. Maybe I should ask that how</div><div>can I implement the topology of the periodic boundary in demplex.</div></div><br></blockquote><div><br></div><div>Plex directly encodes a periodic topology. For example, with a circle, each vertex is connected</div><div>to two neighbors. There are example with periodic boundary conditions like SNES ex12.</div><div><br></div><div> Thanks,</div><div><br></div><div>    Matt</div><div> </div><blockquote type="cite" style="margin:0 0 0 .8ex;border-left:2px #729fcf solid;padding-left:1ex"><div style="text-align:left;direction:ltr"><div>        Thanks again for your kind reply.</div><div><br></div><div>leejearl</div><div>On Thu, 2018-12-06 at 12:02 -0500, Matthew Knepl</div><blockquote type="cite" style="margin:0 0 0 .8ex;border-left:2px #729fcf solid;padding-left:1ex"><div dir="ltr"><div dir="ltr"><div class="gmail_quote"><div dir="ltr">On Thu, Dec 6, 2018 at 9:47 AM leejearl via petsc-users <<a href="mailto:petsc-users@mcs.anl.gov" target="_blank">petsc-users@mcs.anl.gov</a>> wrote:<br></div><blockquote type="cite" style="margin:0 0 0 .8ex;border-left:2px #729fcf solid;padding-left:1ex">Hi, Petsc developer:<br>
        I have a problem for helps. <br>
        There is a dmplex object, and I have distribute it use the<br>
routine DMPlexDistribute(). Then, I want to get the global integer ids<br>
in the label "Face Sets". The code is as follow,<br>
<br>
     ierr = DMGetLabelIdIS(dm, "Face Sets", &bcIdIS);CHKERRQ(ierr);<br>
<br>
The values of bcIdIs are the local integer ids. How can I get the<br>
global integer ids.<br>
<br>
The problem also can be described as follow. The global ids might look<br>
likes<br>
<br>
IS Object: 1 MPI processes<br>
  type: general<br>
Number of indices in set 4<br>
0 1<br>
1 4<br>
2 3<br>
3 2<br>
<br>
But after the dm is distributed, I can only get the local ids as follow<br>
using the routine "DMGetLabelIdIS" <br>
<br>
IS Object: 1 MPI processes<br>
  type: general<br>
[0] Number of indices in set 3<br>
[0] 0 1<br>
[0] 1 2<br>
[0] 2 4<br>
<br>
How can I get the global integer ids in a label after the dm is<br>
distributed?<br>
<br>
Any helps are appreciate! <br></blockquote><div><br></div><div>You can make a conversion from local point numbers to global point numbers using</div><div><br></div><div>  <a href="https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/DMPLEX/DMPlexCreatePointNumbering.html" target="_blank">https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/DMPLEX/DMPlexCreatePointNumbering.html</a></div><div><br></div><div>You could even make a replacement DMLabel with the global point numbers, but I think the win would be small</div><div>or nonexistent for most cases.</div><div><br></div><div>  Thanks,</div><div><br></div><div>    Matt</div><div> </div><blockquote type="cite" style="margin:0 0 0 .8ex;border-left:2px #729fcf solid;padding-left:1ex">
Thanks<br>
<br>
leejearl<br>
<br>
<br>
</blockquote></div><br clear="all"><div><br></div></div></div></blockquote><div><span><pre><br></pre></span></div></div>
</blockquote></div><br clear="all"><div><br></div></div></blockquote><div><span><pre><br></pre></span></div></div>
</blockquote></div><br clear="all"><div><br></div></div></div></blockquote><div><span><pre><br></pre></span></div></div>
</blockquote></div><br clear="all"><div><br></div></blockquote><div><span><pre><br></pre></span></div></div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="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>