[petsc-users] Nodes added to Vertex Set

Matthew Knepley knepley at gmail.com
Thu Jun 12 18:15:43 CDT 2025


On Thu, Jun 12, 2025 at 5:19 PM Noam T. via petsc-users <
petsc-users at mcs.anl.gov> wrote:

> I might be able to answer myself.
>
> in the $Nodes section, the mid-face nodes are included with dimension 2
> a.k.a faces; e.g. the ninth node
>
> 2  6  0 1  <-- 2 is the element dimension, 6 is the tag
> 9
> 0.5 0.5 1.0
>
> So when creating groups for the surfaces, these nodes are also included
> into their own physical groups, which PETSc adds into Vertex Sets.
>
> I don't quite get why these nodes have dimension 2, but that's probably a
> gmsh-related question.
>

Yes, I believe you are right

  Thanks,

     Matt


> On Thursday, June 12th, 2025 at 7:08 PM, Noam T. <dontbugthedevs at proton.me>
> wrote:
>
> 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".
>
>
>

-- 
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which their
experiments lead.
-- Norbert Wiener

https://urldefense.us/v3/__https://www.cse.buffalo.edu/*knepley/__;fg!!G_uCfscf7eWS!Z4curmdejNw0AM-03QfIfgbbKhetBLW0uc73MJdIqhLFlHZPkh5P68z3Pfok2SXAMNYcwxnUCv7iJ4v8rj81$  <https://urldefense.us/v3/__http://www.cse.buffalo.edu/*knepley/__;fg!!G_uCfscf7eWS!Z4curmdejNw0AM-03QfIfgbbKhetBLW0uc73MJdIqhLFlHZPkh5P68z3Pfok2SXAMNYcwxnUCv7iJ4SZvbnG$ >
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20250612/dfe72c90/attachment.html>


More information about the petsc-users mailing list