<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p>Hi Matt and Jed,</p>
<p><br>
</p>
<p>Thanks for your replies.</p>
<p><br>
</p>
<p>I did not consider that distinction Matt, that makes clearer. Maybe it's time to the DAG-stuff on the documentation another attempt...</p>
<p><br>
</p>
<p>Jed, could you point me in the direction of a possible solution to this, if there exists one? In my (FEM) application I'm not using the weak-form stuff, but do I use PetscFE to describe my data layout and access it with DMPlexVec(Mat)Set(Get)Closure and
friends.</p>
<p><br>
</p>
<p>Thanks!</p>
<p><br>
</p>
<p>Vilmer<br>
</p>
</div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>Från:</b> Matthew Knepley <knepley@gmail.com><br>
<b>Skickat:</b> den 15 maj 2023 15:42:20<br>
<b>Till:</b> Jed Brown<br>
<b>Kopia:</b> Vilmer Dahlberg; petsc-users@mcs.anl.gov<br>
<b>Ämne:</b> Re: [petsc-users] Issues creating DMPlex from higher order mesh generated by gmsh</font>
<div> </div>
</div>
<div>
<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>
</div>
</body>
</html>