<div dir="ltr"><span style="color:rgb(80,0,80)">Dear Matt,</span><div><font color="#500050"><br></font></div><div><font color="#500050">    My mesh is something like the following figure, which is composed of three elements : one hexahedron(solid element), one quadrilateral (shell element), and one line (beam element). I found the function "</font>TestEmptyStrata" in file \dm\impls\plex\tests\ex11.c would be a good example to read in such a kind of mesh by using DMPlexSetCone. But a problem is that you should declare all faces and edges of <span style="color:rgb(80,0,80)">hexahedron element, all edges in </span><span style="color:rgb(80,0,80)">quadrilateral</span><span style="color:rgb(80,0,80)">  element by </span>DMPlexSetCone<span style="color:rgb(80,0,80)">, otherwise PETsc could not do topological interpolation afterwards. Am I right here?</span></div><div><span style="color:rgb(80,0,80)">   As general in FEM mesh, my mesh does not contain any information about </span>faces or edges of solid elements. That's why I consider using DMCOMPOSITE. That is</div><div><br></div><div>-   Put <span style="color:rgb(80,0,80)">hexahedron, quadrilateral, and line elements into different  DM structures.</span></div><div><span style="color:rgb(80,0,80)">-   </span><span style="color:rgb(80,0,80)">do topological interpolation in those DMs separately.</span></div><div><span style="color:rgb(80,0,80)">-   composite them.</span></div><div><span style="color:rgb(80,0,80)"><br></span></div><div><span style="color:rgb(80,0,80)">   Is there anything wrong in my above consideration?  Any suggestions?</span></div><div><div><br></div><div>        ------------    <br>      /|             /|     <br>     / |           /  |  cell 0: Hex<br>    /  |          /   |  <br>   ------------/   |<br>   |   |         |   |     <br>   |   |         |   |   cell 1: Quad<br>   |   --------|---|------------<br>   |  /          |  /             /<br>   | /           | /             /<br>   |/            |/             /<br>   -------------------------------------------<br>                                  cell 2: line<br></div></div><div><br></div><div>Much thanks for your help.</div><div><br></div><div>Yuan</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">2021年10月28日(木) 22:05 Matthew Knepley <<a href="mailto:knepley@gmail.com">knepley@gmail.com</a>>:<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 Thu, Oct 28, 2021 at 4:59 AM 袁煕 <<a href="mailto:yuanxi@advancesoft.jp" target="_blank">yuanxi@advancesoft.jp</a>> wrote:<br></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>Dear Matt,</div><div><br></div>Thank you for your quick response.<br><div><br></div><div><span style="color:rgb(0,0,0)"></span>I think what you mean is to build DAG from my mesh at first and then call <a href="https://petsc.org/main/docs/manualpages/DMPLEX/DMPlexCreateFromDAG.html#DMPlexCreateFromDAG" target="_blank">DMPlexCreateFromDAG</a><span style="color:rgb(0,0,0)">() to construct DMPlex. </span></div></div></blockquote><div><br></div><div>No, I do not mean that.</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><span style="color:rgb(0,0,0)">A new problem is,  as I know,</span><span style="color:rgb(0,0,0)"> the function </span>DMPlexInterpolate would generate points with different depth. What's the difference  between those faces and segment elements generated by  DMPlexInterpolate  with that defined by the original mesh, or should we not use DMPlexInterpolate in such a case?</div><div><br></div><div>On the other hand, can DMComposite be used in this case by defining DMPlex with different topological dimensions at first and then composite them?</div></div></blockquote><div><br></div><div>You do not need that. I am obviously not understanding your question. My short answer is that Plex _already_ handles cells of different</div><div>dimension automatically without anything extra.</div><div><br></div><div>Maybe it would help if you defined a specific problem you have.</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>Thanks in advance.</div><div><br></div><div>Yuan</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">2021年10月27日(水) 19:27 Matthew Knepley <<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a>>:<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, Oct 27, 2021 at 4:50 AM 袁煕 <<a href="mailto:yuanxi@advancesoft.jp" target="_blank">yuanxi@advancesoft.jp</a>> wrote:<br></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,<br><div><br></div><div>I am trying to parallelize my serial FEM program using PETSc. This program calculates structure deformation by using various types of elements such as solid, shell, beam, and truss. At the very beginning, I found it was hard for me to put such kinds of elements into DMPlex. Because solid elements are topologically three dimensional, shell element two, and beam or truss are topologically one-dimensional elements. After reading chapter 2.10: "DMPlex: Unstructured Grids in PETSc" of users manual carefully,  I found the provided functions, such as DMPlexSetCone, cannot declare those topological differences.</div><div><br></div><div>My question is : Is it possible and how to define all those topologically different elements into a DMPlex struct?</div></div></blockquote><div><br></div><div>Yes. The idea is to program in a dimension-independent way, so that the code can handle cells of any dimension.</div><div>What you probably want is the "depth" in the DAG representation, which you can think of as the dimension of a cell.</div><div><br></div><div>  <a href="https://petsc.org/main/docs/manualpages/DMPLEX/DMPlexGetPointDepth.html#DMPlexGetPointDepth" target="_blank">https://petsc.org/main/docs/manualpages/DMPLEX/DMPlexGetPointDepth.html#DMPlexGetPointDepth</a></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>Thanks in advance!</div><div><br></div><div>Best regards,</div><div><br></div><div>Yuan.</div><div><br></div></div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr"><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>
</blockquote></div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr"><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>
</blockquote></div>