<div><br></div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu 12. Jan 2023 at 17:58, Blaise Bourdin <<a href="mailto:bourdin@mcmaster.ca">bourdin@mcmaster.ca</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;padding-left:1ex;border-left-color:rgb(204,204,204)">
<div style="line-break:after-white-space">
Out of curiosity, what is the rationale for _reading_ high order gmsh meshes?</div></blockquote><div dir="auto"><br></div><div dir="auto">GMSH can use a CAD engine like OpenCascade. This provides geometric representations via things like BSplines. Such geometric representation are not exposed to the users application code, nor are they embedded in any mesh format GMSH emits. The next best thing is to use a high order representation of the mesh geometry and project the CAD geometry (say a BSpline) into this higher order function space. The projection of the geometry is a quantity that can be described with the .msh format.</div><div dir="auto"><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;padding-left:1ex;border-left-color:rgb(204,204,204)"><div style="line-break:after-white-space" dir="auto">
<div>Is it so that one can write data back in native gmsh format? </div></div></blockquote><div dir="auto"><br></div><div dir="auto">No.</div><div dir="auto"><br></div><div dir="auto">Cheers,</div><div dir="auto">Dave</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;padding-left:1ex;border-left-color:rgb(204,204,204)"><div style="line-break:after-white-space" dir="auto"><div dir="auto"></div></div></blockquote><div dir="auto"><br></div><div dir="auto"><br></div><div dir="auto"><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;padding-left:1ex;border-left-color:rgb(204,204,204)"><div style="line-break:after-white-space"><div dir="auto"></div>
<div><br>
</div>
<div>Regards,</div>
<div>Blaise</div>
<div></div></div><div style="line-break:after-white-space"><div><br>
<div><br>
<blockquote type="cite">
<div>On Jan 12, 2023, at 7:13 PM, Matthew Knepley <<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a>> wrote:</div>
<br>
<div>
<div dir="ltr" style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none">
<div dir="ltr" style="font-family:Helvetica">On Thu, Jan 12, 2023 at 1:33 PM Jed Brown <<a href="mailto:jed@jedbrown.org" target="_blank" style="font-family:Helvetica">jed@jedbrown.org</a>> wrote:<br>
</div>
<div class="gmail_quote" style="font-family:Helvetica">
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;padding-left:1ex;font-family:Helvetica;border-left-color:rgb(204,204,204)">
It's confusing, but this line makes high order simplices always read as discontinuous coordinate spaces. I would love if someone would revisit that, perhaps also using DMPlexSetIsoperiodicFaceSF(),</blockquote>
<div style="font-family:Helvetica"><br>
</div>
<div style="font-family:Helvetica">Perhaps as a switch, but there is no way I am getting rid of the current periodicity. As we have discussed before, breaking the topological relation is a non-starter for me.</div>
<div style="font-family:Helvetica"><br>
</div>
<div style="font-family:Helvetica">It does look like higher order Gmsh does read as DG. We can just project that to CG for non-periodic stuff.</div>
<div style="font-family:Helvetica"><br>
</div>
<div style="font-family:Helvetica"> Thanks,</div>
<div style="font-family:Helvetica"><br>
</div>
<div style="font-family:Helvetica"> Matt</div>
<div style="font-family:Helvetica"><br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;padding-left:1ex;font-family:Helvetica;border-left-color:rgb(204,204,204)">
which should simplify the code and avoid the confusing cell coordinates pattern. Sadly, I don't have time to dive in.<br>
<br>
<a href="https://gitlab.com/petsc/petsc/-/commit/066ea43f7f75752f012be6cd06b6107ebe84cc6d#3616cad8148970af5b97293c49492ff893e25b59_1552_1724" rel="noreferrer" target="_blank" style="font-family:Helvetica">https://gitlab.com/petsc/petsc/-/commit/066ea43f7f75752f012be6cd06b6107ebe84cc6d#3616cad8148970af5b97293c49492ff893e25b59_1552_1724</a><br>
<br>
"Daniel R. Shapero" <<a href="mailto:shapero@uw.edu" target="_blank" style="font-family:Helvetica">shapero@uw.edu</a>> writes:<br>
<br>
> Sorry either your mail system or mine prevented me from attaching the file,<br>
> so I put it on pastebin:<br>
><span style="font-family:Helvetica"> </span><a href="https://pastebin.com/awFpc1Js" rel="noreferrer" target="_blank" style="font-family:Helvetica">https://pastebin.com/awFpc1Js</a><br>
><br>
> On Wed, Jan 11, 2023 at 4:54 PM Matthew Knepley <<a href="mailto:knepley@gmail.com" target="_blank" style="font-family:Helvetica">knepley@gmail.com</a>> wrote:<br>
><br>
>> Can you send the .msh file? I still have not installed Gmsh :)<br>
>><br>
>> Thanks,<br>
>><br>
>> Matt<br>
>><br>
>> On Wed, Jan 11, 2023 at 2:43 PM Daniel R. Shapero <<a href="mailto:shapero@uw.edu" target="_blank" style="font-family:Helvetica">shapero@uw.edu</a>> wrote:<br>
>><br>
>>> Hi all -- I'm trying to read in 2nd-order / piecewise quadratic meshes<br>
>>> that are generated by gmsh and I don't understand how the coordinates are<br>
>>> stored in the plex. I've been discussing this with Matt Knepley here<br>
>>> <<a href="https://urldefense.com/v3/__https://github.com/firedrakeproject/firedrake/issues/982__;!!K-Hz7m0Vt54!hL9WLR51ieyHFZx8N9AjhDwJCRpvmQto9CL1XOTkkAxFfUbtsabHuBDOATnWyP6lQszhA2gOStva7A$" rel="noreferrer" target="_blank" style="font-family:Helvetica">https://urldefense.com/v3/__https://github.com/firedrakeproject/firedrake/issues/982__;!!K-Hz7m0Vt54!hL9WLR51ieyHFZx8N9AjhDwJCRpvmQto9CL1XOTkkAxFfUbtsabHuBDOATnWyP6lQszhA2gOStva7A$</a>><br>
>>> as it pertains to Firedrake but I think this is more an issue at the PETSc<br>
>>> level.<br>
>>><br>
>>> This code<br>
>>> <<a href="https://urldefense.com/v3/__https://gist.github.com/danshapero/a140daaf951ba58c48285ec29f5973cc__;!!K-Hz7m0Vt54!hL9WLR51ieyHFZx8N9AjhDwJCRpvmQto9CL1XOTkkAxFfUbtsabHuBDOATnWyP6lQszhA2hho2eD1g$" rel="noreferrer" target="_blank" style="font-family:Helvetica">https://urldefense.com/v3/__https://gist.github.com/danshapero/a140daaf951ba58c48285ec29f5973cc__;!!K-Hz7m0Vt54!hL9WLR51ieyHFZx8N9AjhDwJCRpvmQto9CL1XOTkkAxFfUbtsabHuBDOATnWyP6lQszhA2hho2eD1g$</a>><br>
>>> uses gmsh to generate a 2nd-order mesh of the unit disk, read it into a<br>
>>> DMPlex, print out the number of cells in each depth stratum, and finally<br>
>>> print a view of the coordinate DM's section. The resulting mesh has 64<br>
>>> triangles, 104 edges, and 41 vertices. For 2nd-order meshes, I'd expected<br>
>>> there to be 2 degrees of freedom at each node and 2 at each edge. The<br>
>>> output is:<br>
>>><br>
>>> ```<br>
>>> Depth strata: [(64, 105), (105, 209), (0, 64)]<br>
>>><br>
>>> PetscSection Object: 1 MPI process<br>
>>> type not yet set<br>
>>> 1 fields<br>
>>> field 0 with 2 components<br>
>>> Process 0:<br>
>>> ( 0) dim 12 offset 0<br>
>>> ( 1) dim 12 offset 12<br>
>>> ( 2) dim 12 offset 24<br>
>>> ...<br>
>>> ( 62) dim 12 offset 744<br>
>>> ( 63) dim 12 offset 756<br>
>>> ( 64) dim 0 offset 768<br>
>>> ( 65) dim 0 offset 768<br>
>>> ...<br>
>>> ( 207) dim 0 offset 768<br>
>>> ( 208) dim 0 offset 768<br>
>>> PetscSectionSym Object: 1 MPI process<br>
>>> type: label<br>
>>> Label 'depth'<br>
>>> Symmetry for stratum value 0 (0 dofs per point): no symmetries<br>
>>> Symmetry for stratum value 1 (0 dofs per point): no symmetries<br>
>>> Symmetry for stratum value 2 (12 dofs per point):<br>
>>> Orientation range: [-3, 3)<br>
>>> Symmetry for stratum value -1 (0 dofs per point): no symmetries<br>
>>> ```<br>
>>><br>
>>> The output suggests that there are 12 degrees of freedom in each<br>
>>> triangle. That would mean the coordinate field is discontinuous across cell<br>
>>> boundaries. Can someone explain what's going on? I tried reading the .msh<br>
>>> file but it's totally inscrutable to me. I'm happy to RTFSC if someone<br>
>>> points me in the right direction. Matt tells me that the coordinate field<br>
>>> should only be discontinuous if the mesh is periodic, but this mesh<br>
>>> shouldn't be periodic.<br>
>>><br>
>><br>
>><br>
>> --<br>
>> What most experimenters take for granted before they begin their<br>
>> experiments is infinitely more interesting than any results to which their<br>
>> experiments lead.<br>
>> -- Norbert Wiener<br>
>><br>
>><span style="font-family:Helvetica"> </span><a href="https://www.cse.buffalo.edu/~knepley/" rel="noreferrer" target="_blank" style="font-family:Helvetica">https://www.cse.buffalo.edu/~knepley/</a><br>
>> <<a href="https://urldefense.com/v3/__http://www.cse.buffalo.edu/*knepley/__;fg!!K-Hz7m0Vt54!hL9WLR51ieyHFZx8N9AjhDwJCRpvmQto9CL1XOTkkAxFfUbtsabHuBDOATnWyP6lQszhA2go23tjRg$" rel="noreferrer" target="_blank" style="font-family:Helvetica">https://urldefense.com/v3/__http://www.cse.buffalo.edu/*knepley/__;fg!!K-Hz7m0Vt54!hL9WLR51ieyHFZx8N9AjhDwJCRpvmQto9CL1XOTkkAxFfUbtsabHuBDOATnWyP6lQszhA2go23tjRg$</a>><br>
>><br>
</blockquote>
</div>
<br clear="all">
<div style="font-family:Helvetica"><br>
</div>
--<span style="font-family:Helvetica"> </span><br>
<div dir="ltr" style="font-family:Helvetica">
<div dir="ltr" style="font-family:Helvetica">
<div style="font-family:Helvetica">
<div dir="ltr" style="font-family:Helvetica">
<div style="font-family:Helvetica">
<div dir="ltr" style="font-family:Helvetica">
<div style="font-family:Helvetica">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 style="font-family:Helvetica"><br>
</div>
<div style="font-family:Helvetica"><a href="http://www.cse.buffalo.edu/~knepley/" target="_blank" style="font-family:Helvetica">https://www.cse.buffalo.edu/~knepley/</a></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<br>
</div></div><div style="line-break:after-white-space"><div><div>
<div dir="auto" style="letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;word-wrap:break-word;line-break:after-white-space;color:rgb(0,0,0)">
<div dir="auto" style="letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;line-break:after-white-space;color:rgb(0,0,0)">
<div dir="auto" style="letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;line-break:after-white-space;color:rgb(0,0,0)">
<div dir="auto" style="letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;line-break:after-white-space;color:rgb(0,0,0)">
<div dir="auto" style="letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;line-break:after-white-space;color:rgb(0,0,0)">
<div dir="auto" style="letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;line-break:after-white-space;color:rgb(0,0,0)">
<div dir="auto" style="letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;line-break:after-white-space;color:rgb(0,0,0)">
<div dir="auto" style="letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;line-break:after-white-space;color:rgb(0,0,0)">
<div dir="auto" style="letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;line-break:after-white-space;color:rgb(0,0,0)">
<div dir="auto" style="letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;line-break:after-white-space;color:rgb(0,0,0)">
<div dir="auto" style="letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;line-break:after-white-space;color:rgb(0,0,0)">
<div dir="auto" style="letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;line-break:after-white-space;color:rgb(0,0,0)">
<div dir="auto" style="letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;line-break:after-white-space;color:rgb(0,0,0)">
<div dir="auto" style="letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;line-break:after-white-space;color:rgb(0,0,0)">
<div dir="auto" style="letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;line-break:after-white-space;color:rgb(0,0,0)">
<div>— <br>
Canada Research Chair in Mathematical and Computational Aspects of Solid Mechanics (Tier 1)</div>
<div>Professor, Department of Mathematics & Statistics<br>
Hamilton Hall room 409A, McMaster University<br>
<a href="https://www.google.com/maps/search/1280+Main+Street+West,+Hamilton,+Ontario+L8S+4K1,+Canada?entry=gmail&source=g">1280 Main Street West, Hamilton,</a> <a href="https://www.google.com/maps/search/1280+Main+Street+West,+Hamilton,+Ontario+L8S+4K1,+Canada?entry=gmail&source=g">Ontario L8S 4K1, Canada</a> <br>
<a href="https://www.math.mcmaster.ca/bourdin" target="_blank">https://www.math.mcmaster.ca/bourdin</a> | +1 (905) 525 9140 ext. 27243</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<br>
</div>
</div>
</blockquote></div></div>