<div dir="ltr"><div dir="ltr">On Wed, Feb 5, 2025 at 1:24 PM neil liu <<a href="mailto:liufield@gmail.com">liufield@gmail.com</a>> wrote:</div><div class="gmail_quote gmail_quote_container"><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 dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">The corners can be set with MMG's own API function, LIBMMG3D_EXPORT int  MMG3D_Set_corner(MMG5_pMesh mesh, MMG5_int k);</div></div></div></div></div></div></blockquote><div><br></div><div>This definitely sets a corner attribute on a vertex.</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 dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>The edges can be set with MMG's own API function,   LIBMMG3D_EXPORT int MMG3D_Set_edges(MMG5_pMesh mesh, MMG5_int *edges, MMG5_int* refs);</div></div></div></div></div></div></blockquote><div><br></div><div>This seems to define all the edges in the mesh. Are you saying that MMG only uses these edge definitions for open boundaries?</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 dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>MMG doesn't have a very detailed documentation. The above API subroutines can be found, </div><div><a href="https://urldefense.us/v3/__https://github.com/MmgTools/mmg/blob/master/src/mmg3d/libmmg3d.h__;!!G_uCfscf7eWS!bKdWOtCvA_Azjc29v2WxofGzpDjbNC-541kCXKvj0mo0SQ3dcS8irHwWYb3ckQSWb9JR7g5WkUqnonymjfwv$" target="_blank">mmg/src/mmg3d/libmmg3d.h at master · MmgTools/mmg · GitHub</a></div></div></div></div></div></div></blockquote><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 dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>Thanks,</div><div><br></div><div>Xiaodong</div></div></div></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Feb 5, 2025 at 1:16 PM Matthew Knepley <<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</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 dir="ltr"><div dir="ltr">On Wed, Feb 5, 2025 at 1:06 PM neil liu <<a href="mailto:liufield@gmail.com" target="_blank">liufield@gmail.com</a>> wrote:</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">Hi, Matt,<div><br></div><div>It is not enough to only turn on -the open boundary. </div><div>For the above example,  the 4 physical corner vertices (0D) for this internal quadrilateral surface have to be set, otherwise the shape can not be kept. </div><div>In addition, for my present case, the boundary edges (1D) consisting of this quadrilateral surface need to be tagged. </div><div>The present bdLabel seems to only work for 2D shapes for 3D cases.</div><div>Please correct me if I am wrong. </div></div></blockquote><div><br></div><div>Are you saying that this is the interface published by MMG? Can you point me toward the piece of MMG documentation? I just want to understand the interface requirements before we make any changes to PETSc.</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><br></div><div>Thanks, </div><div><br></div><div>Xiaodong </div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Feb 5, 2025 at 12:05 PM Matthew Knepley <<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</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 dir="ltr">This is a really poor name. The boundary is not open in any sense. It should be called an internal boundary, and what they call internal boundaries should be called interdomain boundaries, but it seems too late to fix this.<div><br></div><div>Turning on open boundaries is just a flag, so that is easy, and one can see the usefulness of this mode.</div><div><br></div><div>My understanding from the documentation link below is that MMG does not change anything about parts of the mesh marked</div><div>as internal boundaries, so we can read them right back out from the boundary label. Why would we need a new label for this?</div><div><br></div><div>  Thanks,</div><div><br></div><div>     Matt</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Feb 5, 2025 at 11:22 AM Pierre Jolivet <<a href="mailto:pierre@joliv.et" target="_blank">pierre@joliv.et</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>See also: <a href="https://urldefense.us/v3/__https://www.mmgtools.org/mmg-remesher-try-mmg/mmg-remesher-tutorials/mmg-remesher-mmg3d/open-boundary-remeshing__;!!G_uCfscf7eWS!bKdWOtCvA_Azjc29v2WxofGzpDjbNC-541kCXKvj0mo0SQ3dcS8irHwWYb3ckQSWb9JR7g5WkUqnorKeyTJt$" target="_blank">https://www.mmgtools.org/mmg-remesher-try-mmg/mmg-remesher-tutorials/mmg-remesher-mmg3d/open-boundary-remeshing</a>.<div><br></div><div>Thanks,</div><div>Pierre<br id="m_7177489474945856139m_-5508104525105872091m_374923789566632631m_-7847456199305676236m_3773341779745083509lineBreakAtBeginningOfMessage"><div><br><blockquote type="cite"><div>On 5 Feb 2025, at 4:39 PM, neil liu <<a href="mailto:liufield@gmail.com" target="_blank">liufield@gmail.com</a>> wrote:</div><br><div><div dir="ltr">It seems the figures were  broken. Please see the following attached. </div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Feb 5, 2025 at 10:36 AM neil liu <<a href="mailto:liufield@gmail.com" target="_blank">liufield@gmail.com</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 dir="ltr"><div dir="ltr"><div dir="ltr">Hi, Mark, <div><div><p>For example, in the left figure, the yellow rectangular face needs to be preserved during mesh refinement. However, without specifying its four corner points, the rectangle cannot be maintained, as shown in the right figure. Additionally, the four edges of this face must be recorded and retrieved for post-processing.</p><p>This yellow face is an <strong>open boundary</strong>, meaning it is not an interface between different materials. To ensure its preservation during mesh refinement, MMG must be run in <strong>opnbdy</strong> (open boundary) mode.</p></div><div><br></div><div>Thanks a lot,</div><div><br></div><div>Xiaodong </div><img alt="image.png" width="381" height="321" style="margin-right: 0px;"> <img alt="image.png" width="498" height="321" style="margin-right: 0px;"></div><div><br></div></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Feb 5, 2025 at 10:05 AM Matthew Knepley <<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</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 dir="ltr"><div dir="ltr">On Wed, Feb 5, 2025 at 9:52 AM neil liu <<a href="mailto:liufield@gmail.com" target="_blank">liufield@gmail.com</a>> wrote:</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"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><font size="4">Dear developers, </font></div><div dir="ltr"><p><font face="tahoma, sans-serif">I am currently working with MMG in the context of PETSc and have identified a need to modify the existing MMG interface, <code>DMAdaptMetric_Mmg_Plex()</code>, for our use case. Given these requirements, I would like to explore the feasibility of contributing to PETSc to enhance this interface, which has been verified and validated in our research code. </font></p><h3><strong><font face="tahoma, sans-serif">Proposed Modifications:</font></strong></h3><ol><li><p><strong><font face="tahoma, sans-serif">Additional Labels for Physical Entities:</font></strong></p><ul><li><font face="tahoma, sans-serif">In addition to the existing <code>bdLabel</code> and <code>rgLabel</code>, our case requires two additional labels to represent physical vertices and edges within the computational domain (3D).</font></li></ul></li></ol></div></div></div></div></div></div></div></blockquote><div>I am open to this. Can you be more specific about what it means? </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 dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><ol><li><ul><li><font face="tahoma, sans-serif">One approach is to introduce two new parameters in the subroutine’s input list. However, this may require modifications across related components, such as Pragmatic. </font></li></ul></li></ol></div></div></div></div></div></div></div></blockquote><div>This is not a problem. I can modify those. </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 dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><ol><li><p><strong><font face="tahoma, sans-serif">Support for Open Boundaries:</font></strong></p><ul><li><font face="tahoma, sans-serif">The current interface does not support open boundaries, a feature available in MMG.</font></li><li><font face="tahoma, sans-serif">As a result, several MMG benchmark cases involving open boundary remeshing cannot be executed within PETSc.</font></li></ul></li></ol></div></div></div></div></div></div></div></blockquote><div>Can you explain what this means? What is an open boundary exactly?</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 dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><p><font face="tahoma, sans-serif">Would this be a viable contribution to PETSc? If so, I would appreciate any guidance on the best approach to implementing these changes while maintaining compatibility with existing features.</font></p></div></div></div></div></div></div></div></blockquote><div>Yes. Please make a fork of the petsc repo, make a branch with the proposed changes, make an MR for that branch, and add me to your fork (I am knepley on GitLab). I can help you get it going.</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 dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><p><font face="tahoma, sans-serif">Looking forward to your thoughts.</font></p><p><font face="tahoma, sans-serif">Best regards,</font></p></div><div dir="ltr"><span style="font-size:large"><br></span></div><div dir="ltr"><span style="font-size:large">Thanks, </span></div><div dir="ltr"><font size="4">Xiaodong </font><br><div><code><font face="arial black, sans-serif"><b></b></font></code></div><div><code><font face="arial black, sans-serif"><b><br></b></font></code></div><div><code><font face="arial black, sans-serif"><b><br></b></font></code></div><div><code><font face="arial black, sans-serif"><br></font></code></div><div><code><font face="arial black, sans-serif"><br></font></code></div><div><br></div><div><code><font face="arial black, sans-serif"><br></font></code></div><div><code><font face="arial black, sans-serif"><br></font></code></div><div><br></div></div></div></div></div></div></div></div>
</blockquote></div><div><br clear="all"></div><div><br></div><span class="gmail_signature_prefix">-- </span><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="https://urldefense.us/v3/__http://www.cse.buffalo.edu/*knepley/__;fg!!G_uCfscf7eWS!anvbtQDqn57whvgg2qc1Dix0Izm9kxNlvUkeyYkcfknnt6VmqbCE0mlGSj6O1DLJx6qR7-7UsHv48zbaqVDECw$" target="_blank">https://www.cse.buffalo.edu/~knepley/</a><br></div></div></div></div></div></div></div></div>
</blockquote></div>
</blockquote></div>
<span id="m_7177489474945856139m_-5508104525105872091m_374923789566632631m_-7847456199305676236m_3773341779745083509cid:f_m6s2q0541"><The right figure.png></span><span id="m_7177489474945856139m_-5508104525105872091m_374923789566632631m_-7847456199305676236m_3773341779745083509cid:f_m6s2q04n0"><The left figure.png></span></div></blockquote></div><br></div></div></blockquote></div><div><br clear="all"></div><div><br></div><span class="gmail_signature_prefix">-- </span><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="https://urldefense.us/v3/__http://www.cse.buffalo.edu/*knepley/__;fg!!G_uCfscf7eWS!bKdWOtCvA_Azjc29v2WxofGzpDjbNC-541kCXKvj0mo0SQ3dcS8irHwWYb3ckQSWb9JR7g5WkUqnorzjJhf8$" target="_blank">https://www.cse.buffalo.edu/~knepley/</a><br></div></div></div></div></div></div></div>
</blockquote></div>
</blockquote></div><div><br clear="all"></div><div><br></div><span class="gmail_signature_prefix">-- </span><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="https://urldefense.us/v3/__http://www.cse.buffalo.edu/*knepley/__;fg!!G_uCfscf7eWS!bKdWOtCvA_Azjc29v2WxofGzpDjbNC-541kCXKvj0mo0SQ3dcS8irHwWYb3ckQSWb9JR7g5WkUqnorzjJhf8$" target="_blank">https://www.cse.buffalo.edu/~knepley/</a><br></div></div></div></div></div></div></div></div>
</blockquote></div>
</blockquote></div><div><br clear="all"></div><div><br></div><span class="gmail_signature_prefix">-- </span><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="https://urldefense.us/v3/__http://www.cse.buffalo.edu/*knepley/__;fg!!G_uCfscf7eWS!bKdWOtCvA_Azjc29v2WxofGzpDjbNC-541kCXKvj0mo0SQ3dcS8irHwWYb3ckQSWb9JR7g5WkUqnorzjJhf8$" target="_blank">https://www.cse.buffalo.edu/~knepley/</a><br></div></div></div></div></div></div></div></div>