<div dir="ltr"><div dir="ltr">On Thu, Jun 12, 2025 at 5:19 PM Noam T. via petsc-users <<a href="mailto:petsc-users@mcs.anl.gov">petsc-users@mcs.anl.gov</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>I might be able to answer myself.</div><div style="font-family:Arial,sans-serif;font-size:14px;color:rgb(0,0,0);background-color:rgb(255,255,255)"><br></div><div style="font-family:Arial,sans-serif;font-size:14px;color:rgb(0,0,0);background-color:rgb(255,255,255)">in the $Nodes section, the mid-face nodes are included with dimension 2 a.k.a faces; e.g. the ninth node</div><div style="font-family:Arial,sans-serif;font-size:14px;color:rgb(0,0,0);background-color:rgb(255,255,255)"><br></div><div style="font-family:Arial,sans-serif;font-size:14px;color:rgb(0,0,0);background-color:rgb(255,255,255)"><span>2 6 0 1 <-- 2 is the element dimension, 6 is the tag<br></span><div><span>9</span></div><div><span>0.5 0.5 1.0</span></div><span></span></div><div style="font-family:Arial,sans-serif;font-size:14px;color:rgb(0,0,0);background-color:rgb(255,255,255)"><br></div><div style="font-family:Arial,sans-serif;font-size:14px;color:rgb(0,0,0);background-color:rgb(255,255,255)">So when creating groups for the surfaces, these nodes are also included into their own physical groups, which PETSc adds into Vertex Sets.<br></div><div style="font-family:Arial,sans-serif;font-size:14px;color:rgb(0,0,0);background-color:rgb(255,255,255)"><br></div><div style="font-family:Arial,sans-serif;font-size:14px;color:rgb(0,0,0);background-color:rgb(255,255,255)">I don't quite get why these nodes have dimension 2, but that's probably a gmsh-related question.</div></blockquote><div><br></div><div>Yes, I believe you are right</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>
On Thursday, June 12th, 2025 at 7:08 PM, Noam T. <<a href="mailto:dontbugthedevs@proton.me" target="_blank">dontbugthedevs@proton.me</a>> wrote:<br>
<blockquote type="cite">
<div style="font-family:Arial,sans-serif;font-size:14px">Hello,</div><div style="font-family:Arial,sans-serif;font-size:14px"><br></div><div style="font-family:Arial,sans-serif;font-size:14px">In the mesh attached, a 1x1x1 cube with 8 nodes, physical groups are defined for the 6 bounding faces only. According to the GUI, and looking at the MSH file in $Entities, there are no physical groups for nodes.</div><div style="font-family:Arial,sans-serif;font-size:14px"><br></div><div style="font-family:Arial,sans-serif;font-size:14px">Using the following code:</div><div style="font-family:Arial,sans-serif;font-size:14px"><br></div><div style="font-family:Arial,sans-serif;font-size:14px">---<br></div><div style="font-family:Arial,sans-serif;font-size:14px"><span>#include <stdio.h></span><div><span>#include <petscdmplex.h></span></div><div><br></div><div><span>int main(int argc, char *argv[]) {</span></div><div><br></div><div><span> DM dm;</span></div><div><span> PetscInt v;</span></div><div><br></div><div><span> PetscCall(PetscInitialize(&argc, &argv, NULL, NULL));</span></div><div><br></div><div><span> PetscCall(PetscOptionsInsertString(NULL, " -dm_plex_gmsh_mark_vertices "));</span></div><div><span> PetscCall(DMPlexCreateFromFile(PETSC_COMM_WORLD, "mesh.msh", "test", PETSC_TRUE, &dm));</span></div><div><span> PetscCall(DMGetLabelSize(dm, "Vertex Sets", &v));</span></div><div><span> printf("\nVertex set size %d\n", v);</span></div><div><br></div><div><span> PetscCall(PetscFinalize());</span></div><div><span>}</span></div><span></span></div><div style="font-family:Arial,sans-serif;font-size:14px">---<br></div><div style="font-family:Arial,sans-serif;font-size:14px">it says "Vertex Sets" has size 6, with IS [1, 2, 3, 4, 5, 6]. Is that intended behavior? Up until now I relied on having an empty set whenever physical tags where not explicitly defined, but this one mesh seems to be an exception.</div><div style="font-family:Arial,sans-serif;font-size:14px"><br></div><div style="font-family:Arial,sans-serif;font-size:14px">Thanks.</div><div style="font-family:Arial,sans-serif;font-size:14px"><br></div><div style="font-family:Arial,sans-serif;font-size:14px">Noam<br></div><div style="font-family:Arial,sans-serif;font-size:14px"><br></div><div style="font-family:Arial,sans-serif;font-size:14px">PS: The size is v = 0 when removing the flag "<span>-dm_plex_gmsh_mark_vertices".</span><br></div>
</blockquote><br>
</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!Z4curmdejNw0AM-03QfIfgbbKhetBLW0uc73MJdIqhLFlHZPkh5P68z3Pfok2SXAMNYcwxnUCv7iJ4SZvbnG$" target="_blank">https://www.cse.buffalo.edu/~knepley/</a><br></div></div></div></div></div></div></div></div>