[petsc-users] Nodes added to Vertex Set
Noam T.
dontbugthedevs at proton.me
Thu Jun 12 14:08:33 CDT 2025
Hello,
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.
Using the following code:
---
#include <stdio.h>
#include <petscdmplex.h>
int main(int argc, char *argv[]) {
DM dm;
PetscInt v;
PetscCall(PetscInitialize(&argc, &argv, NULL, NULL));
PetscCall(PetscOptionsInsertString(NULL, " -dm_plex_gmsh_mark_vertices "));
PetscCall(DMPlexCreateFromFile(PETSC_COMM_WORLD, "mesh.msh", "test", PETSC_TRUE, &dm));
PetscCall(DMGetLabelSize(dm, "Vertex Sets", &v));
printf("\nVertex set size %d\n", v);
PetscCall(PetscFinalize());
}
---
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.
Thanks.
Noam
PS: The size is v = 0 when removing the flag "-dm_plex_gmsh_mark_vertices".
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20250612/51593585/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mesh.msh
Type: model/mesh
Size: 1778 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20250612/51593585/attachment.msh>
More information about the petsc-users
mailing list