<div dir="ltr"><div dir="ltr">On Mon, May 15, 2023 at 9:30 AM Jed Brown <<a href="mailto:jed@jedbrown.org">jed@jedbrown.org</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">Matthew Knepley <<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a>> writes:<br>
<br>
> On Fri, May 5, 2023 at 10:55 AM Vilmer Dahlberg via petsc-users <<br>
> <a href="mailto:petsc-users@mcs.anl.gov" target="_blank">petsc-users@mcs.anl.gov</a>> wrote:<br>
><br>
>> Hi.<br>
>><br>
>><br>
>> I'm trying to read a mesh of higher element order, in this example a mesh<br>
>> consisting of 10-node tetrahedral elements, from gmsh, into PETSC. But It<br>
>> looks like the mesh is not properly being loaded and converted into a<br>
>> DMPlex. gmsh tells me it has generated a mesh with 7087 nodes, but when I<br>
>> view my dm object it tells me it has 1081 0-cells. This is the printout I<br>
>> get<br>
>><br>
><br>
> Hi Vilmer,<br>
><br>
> Plex makes a distinction between topological entities, like vertices, edges<br>
> and cells, and the function spaces used to represent fields, like velocity<br>
> or coordinates. When formats use "nodes", they mix the two concepts<br>
> together.<br>
><br>
> You see that if you add the number of vertices and edges, you get 7087,<br>
> since for P2 there is a "node" on every edge. Is anything else wrong?<br>
<br>
Note that quadratic (and higher order) tets are broken with the Gmsh reader. It's been on my todo list for a while.<br>
<br>
As an example, this works when using linear elements (the projection makes them quadratic and visualization is correct), but is tangled when holes.msh is quadratic.<br>
<br>
$ $PETSC_ARCH/tests/dm/impls/plex/tutorials/ex1 -dm_plex_filename ~/meshes/holes.msh -dm_view cgns:s.cgns -dm_coord_petscspace_degree 2<br>
</blockquote></div><br clear="all"><div>Projection to the continuous space is broken because we do not have the lexicographic order on simplicies done. Are you sure you are projecting into the broken space?</div><div><br></div><div> Thanks,</div><div><br></div><div> Matt</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="http://www.cse.buffalo.edu/~knepley/" target="_blank">https://www.cse.buffalo.edu/~knepley/</a><br></div></div></div></div></div></div></div></div>