[petsc-users] Issues creating DMPlex from higher order mesh generated by gmsh

Matthew Knepley knepley at gmail.com
Mon May 15 07:02:51 CDT 2023


On Fri, May 5, 2023 at 10:55 AM Vilmer Dahlberg via petsc-users <
petsc-users at mcs.anl.gov> wrote:

> Hi.
>
>
> I'm trying to read a mesh of higher element order, in this example a mesh
> consisting of 10-node tetrahedral elements, from gmsh, into PETSC. But It
> looks like the mesh is not properly being loaded and converted into a
> DMPlex. gmsh tells me it has generated a mesh with 7087 nodes, but when I
> view my dm object it tells me it has 1081 0-cells. This is the printout I
> get
>

Hi Vilmer,

Plex makes a distinction between topological entities, like vertices, edges
and cells, and the function spaces used to represent fields, like velocity
or coordinates. When formats use "nodes", they mix the two concepts
together.

You see that if you add the number of vertices and edges, you get 7087,
since for P2 there is a "node" on every edge. Is anything else wrong?

  Thanks,

     Matt


> ...
>
>
> Info    : Done meshing order 2 (Wall 0.0169823s, CPU 0.016662s)
>
> Info    : 7087 nodes 5838 elements
>
> ...
>
> DM Object: DM_0x84000000_0 1 MPI process
>   type: plex
> DM_0x84000000_0 in 3 dimensions:
>   Number of 0-cells per rank: 1081
>   Number of 1-cells per rank: 6006
>   Number of 2-cells per rank: 9104
>   Number of 3-cells per rank: 4178
> Labels:
>   celltype: 4 strata with value/size (0 (1081), 6 (4178), 3 (9104), 1
> (6006))
>   depth: 4 strata with value/size (0 (1081), 1 (6006), 2 (9104), 3 (4178))
>   Cell Sets: 1 strata with value/size (2 (4178))
>   Face Sets: 6 strata with value/size (12 (190), 21 (242), 20 (242), 11
> (192), 22 (242), 10 (188))
> Field P2:
>   adjacency FEM
> ...
>
>
> To replicate the error try generating a mesh according to
>
>
> https://gmsh.info/doc/texinfo/gmsh.html#t5
>
>
> <https://gmsh.info/doc/texinfo/gmsh.html#t5>
>
> setting the element order to 2, and then loading the mesh using
>
>
> DMPlexCreateGmshFromFile
>
>
> I don't have any issues when i set the element order to 1.
>
>
> Thanks in advance,
>
> Vilmer
>


-- 
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://www.cse.buffalo.edu/~knepley/ <http://www.cse.buffalo.edu/~knepley/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20230515/7da7a394/attachment.html>


More information about the petsc-users mailing list