<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Thu, Feb 15, 2018 at 5:43 PM, Mohammad Hassan Baghaei <span dir="ltr"><<a href="mailto:mhbaghaei@mail.sjtu.edu.cn" target="_blank">mhbaghaei@mail.sjtu.edu.cn</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div lang="EN-US" link="blue" vlink="purple"><div class="m_-3215100152863041539WordSection1"><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">Hi Matt<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">In fact, I created a routine for my specific mesh generation. I firstly, create the DMPlex object at first, then setting the chart, then doing symmetrize and interpolate. Next, I created coordinate section and giving the coordinates. After finishing giving the coordinates, I declare the distribution in routine, with this two lines:<u></u><u></u></span></p><p class="MsoNormal"><span lang="DE" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"></span></p></div></div></blockquote><div><br></div><div>If you are creating the whole mesh, then you want to enclose the creation steps in</div><div><br></div><div>if (!rank) {</div><div> <your current code for creating the chart and cones></div><div>} else {</div><div> DMCreate()</div><div> DMSetType()</div><div>}</div><div>DMPlexSymmetrize()</div><div>DMPlexInterpolate()</div><div><br></div><div>There are examples of me doing this in the Plex tests.</div><div><br></div><div> Thanks,</div><div><br></div><div> Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div lang="EN-US" link="blue" vlink="purple"><div class="m_-3215100152863041539WordSection1"><p class="MsoNormal"><span lang="DE" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">DMPlexDistribute(*dm, 0, NULL, &dmDist);<u></u><u></u></span></p><p class="MsoNormal"><span lang="DE" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">if (dmDist) {DMDestroy(dm); *dm = dmDist;}<u></u><u></u></span></p><p class="MsoNormal"><span lang="DE" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">Thanks<u></u><u></u></span></p><p class="MsoNormal"><span lang="DE" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">Amir<u></u><u></u></span></p><p class="MsoNormal"><span lang="DE" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> Matthew Knepley [mailto:<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a>] <br><b>Sent:</b> Friday, February 16, 2018 6:34 AM<br><b>To:</b> Mohammad Hassan Baghaei <<a href="mailto:mhbaghaei@mail.sjtu.edu.cn" target="_blank">mhbaghaei@mail.sjtu.edu.cn</a>><br><b>Cc:</b> PETSc <<a href="mailto:petsc-users@mcs.anl.gov" target="_blank">petsc-users@mcs.anl.gov</a>><br><b>Subject:</b> Re: [petsc-users] Dealing with DMPlexDistribute()<u></u><u></u></span></p><p class="MsoNormal"><u></u> <u></u></p><div><div><div><p class="MsoNormal">On Thu, Feb 15, 2018 at 4:40 PM, Mohammad Hassan Baghaei <<a href="mailto:mhbaghaei@mail.sjtu.edu.cn" target="_blank">mhbaghaei@mail.sjtu.edu.cn</a>> wrote:<u></u><u></u></p><blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in"><div><div><p class="MsoNormal">Hi <u></u><u></u></p><p class="MsoNormal">I am using DMPlex as interface for mesh generation. On single core, I got around 30000 mesh cells. Whenever, I run on multiple core, say 3, in the output file for DM, VTK, I got 3 times mesh cell and point numbers. Does it mean that DMPlexDistribute() does not work properly!<u></u><u></u></p></div></div></blockquote><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">Hi Amir,<u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">It sounds like you are generating a mesh on every process. How are you generating the mesh?<u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal"> Thanks,<u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal"> Matt<u></u><u></u></p></div><div><p class="MsoNormal"> <u></u><u></u></p></div><blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in"><div><div><p class="MsoNormal">Thanks <u></u><u></u></p><p class="MsoNormal">Amir<u></u><u></u></p></div></div></blockquote></div><p class="MsoNormal"><br><br clear="all"><u></u><u></u></p><div><p class="MsoNormal"><u></u> <u></u></p></div><p class="MsoNormal">-- <u></u><u></u></p><div><div><div><div><div><p class="MsoNormal">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<u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal"><a href="http://www.caam.rice.edu/~mk51/" target="_blank">https://www.cse.buffalo.edu/~<wbr>knepley/</a><u></u><u></u></p></div></div></div></div></div></div></div></div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><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.caam.rice.edu/~mk51/" target="_blank">https://www.cse.buffalo.edu/~knepley/</a><br></div></div></div></div></div>
</div></div>