<div dir="ltr"><div dir="ltr">On Sun, Sep 19, 2021 at 3:27 PM Carlos Velazquez <<a href="mailto:carlos.v.hd1@gmail.com">carlos.v.hd1@gmail.com</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 dir="ltr"><div dir="ltr"><div dir="ltr">Hi there. I have a question whether I can get the DAG values in DMPlex in a different order.</div><div dir="ltr"><br></div><div dir="ltr">I am working on a code that uses the same node ordering to form the elements found in the mesh file. Example:</div><div dir="ltr"><br></div><div dir="ltr">If I use the file "doublet-tet.msh" that is inside the DMPlex mesh files folder, this file tells us that the elements are formed as follows:</div><div dir="ltr"><br></div><div dir="ltr">1 - 2 4 3 1</div><div dir="ltr">2 - 2 3 4 5</div><div dir="ltr">Element 1 by nodes 2, 4, 3, 1</div><div dir="ltr">Element 2 by nodes 2, 3, 4, 5</div><div dir="ltr"><br></div><div dir="ltr">So what I'm doing to get this through DMPlex is getting the transitive closure with DMPlexGetTransitiveClosure and getting the points from level 0, which is the node level, but the ordering is different. Example:</div><div dir="ltr"><br></div><div dir="ltr">With DMPlexGetTransitiveClosure I obtain that the elements are formed as follows:</div><div dir="ltr"><br></div><div dir="ltr">0 - 5 3 4 2</div><div dir="ltr">1 - 4 3 5 6</div><div dir="ltr">Element 1 by nodes 5, 3, 4, 2</div><div dir="ltr">Element 2 by nodes 4, 3, 5, 6</div><div dir="ltr"><br></div><div dir="ltr">But comparing this ordering with the previous one in the coordinate matrix I can see that the order is not equivalent.</div><div dir="ltr"><br></div><div dir="ltr">I would like to know if there is a way to modify the ordering of the graph to obtain the same ordering that is in the mesh file for the nodes that make up the elements or even if there is some way to configure it for a specific desired order.</div></div></div></div>
</blockquote></div><br clear="all"><div>The problem is that GMsh orients tetrahedra differently than Plex. We like outward normals, whereas the GMsh convention has the normal for the</div><div>first face pointing inward. Thus, when we read in a GMsh tet, we flip the first two vertices. So</div><div><br></div><div> 0 - 5 3 4 2</div><div><br></div><div>but if we number from 1 instead of 0, and number cells and vertices separately,</div><div><br></div><div> 1 - 4 2 3 1</div><div><br></div><div>which if you flip vertices 1 and 2 is</div><div><br></div><div> 1 - 2 4 3 1</div><div><br></div><div>which is what you read in.</div><div><br></div><div> Thanks,</div><div><br></div><div> Matt</div><div><br></div>-- <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="http://www.cse.buffalo.edu/~knepley/" target="_blank">https://www.cse.buffalo.edu/~knepley/</a><br></div></div></div></div></div></div></div></div>