<div dir="ltr">Jed is right about the numerics. However, this does not look hard. Here is my try at it:<div><br></div><div>  <a href="https://gitlab.com/petsc/petsc/-/merge_requests/4838">https://gitlab.com/petsc/petsc/-/merge_requests/4838</a></div><div><br></div><div>Please tell me if this works and I will make a test and merge.</div><div><br></div><div>  Thanks,</div><div><br></div><div>    Matt</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Feb 10, 2022 at 6:47 PM Jed Brown <<a href="mailto:jed@jedbrown.org">jed@jedbrown.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Susanne, do you want PetscFE to make the serendipity (8-node) finite element space or do you just want to read these meshes? I.e., would it be okay with you if the coordinates were placed in a Q_2 (9-node, biquadratic) finite element space?<br>
<br>
This won't matter if you're traversing the dofs per edge manually, but there are some efficiency benefits of using the Q_2 space (especially if your code can use the tensor product, perhaps via a library like libCEED). Note that Q_2 spaces have better stability properties. For example, the Q_2 space is inf-sup stable with P_1 discontinuous pressure (gives third order L^2 and second order H^1 convergence), but serendipity (8-node) is only stable with piecewise constant pressure (gives second order L^2 and first order H^1 convergence).<br>
<br>
Susanne Claus <<a href="mailto:susanne.claus@onera.fr" target="_blank">susanne.claus@onera.fr</a>> writes:<br>
<br>
> Dear Matthew,<br>
><br>
> Thank you so much.<br>
> I have a attached a small 8-noded quadrilateral mesh file (Version 4 <br>
> ASCII) generated with gmsh 4.8.4.<br>
><br>
> Best wishes,<br>
> Susanne<br>
><br>
> On 10.02.2022 16:23, Matthew Knepley wrote:<br>
><br>
>> On Thu, Feb 10, 2022 at 10:12 AM Susanne Claus <<a href="mailto:susanne.claus@onera.fr" target="_blank">susanne.claus@onera.fr</a>> <br>
>> wrote:<br>
>> <br>
>>> Hello,<br>
>>> <br>
>>> I am using DMPlex for the mesh structure of a solid mechanics finite <br>
>>> element code. I mainly use gmsh as input file format. When I try to <br>
>>> read in 8-noded Quadrilaterals (Element type 16 in gmsh) DMPlex tells <br>
>>> me that this element type is unknown. However a 9-noded Quadrilateral <br>
>>> can be read without problem. On inspecting the plexgmsh.c source code <br>
>>> I can see that 8-noded quadrilaterals are deactivated:<br>
>>> <br>
>>> #if 0<br>
>>> 146:   {20, GMSH_TRI, 2, 3, 3,  9, NULL},<br>
>>> 147:   {16, GMSH_QUA, 2, 2, 4,  8, NULL},<br>
>>> <br>
>>> For our application these 8-noded quadrilateral are very important.<br>
>>> <br>
>>> Is there any reason why they have not been implemented/deactivated in <br>
>>> the dmplex gmsh reader?<br>
>> <br>
>> No, we can handle them in the same way I think. Let me look at it. <br>
>> Hopefully it is easy.<br>
>> <br>
>> Thanks,<br>
>> <br>
>> Matt<br>
>> <br>
>>> Thank you for all the great work you are doing. PETSc is amazing.<br>
>>> <br>
>>> Best wishes,<br>
>>> Susanne Claus<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 <br>
>> their experiments lead.<br>
>> -- Norbert Wiener<br>
>> <br>
>> <a href="https://www.cse.buffalo.edu/~knepley/" rel="noreferrer" target="_blank">https://www.cse.buffalo.edu/~knepley/</a> [1]<br>
><br>
> -- <br>
><br>
> Susanne Claus<br>
> Ingénieur Chercheur<br>
> Applied Mathematics and Scientific Computing Group<br>
> DTIS<br>
><br>
> ONERA - The French Aerospace Lab<br>
> 6 Chemin de la Vauve aux Granges, 91120 Palaiseau<br>
><br>
> Links:<br>
> ------<br>
> [1] <a href="http://www.cse.buffalo.edu/~knepley/" rel="noreferrer" target="_blank">http://www.cse.buffalo.edu/~knepley/</a><br>
> $MeshFormat<br>
> 4.1 0 8<br>
> $EndMeshFormat<br>
> $PhysicalNames<br>
> 2<br>
> 1 2 "Neumann"<br>
> 2 1 "Domain"<br>
> $EndPhysicalNames<br>
> $Entities<br>
> 4 4 1 0<br>
> 1 0 0 0 0 <br>
> 2 1 0 0 0 <br>
> 3 1 1 0 0 <br>
> 4 0 1 0 0 <br>
> 1 -9.999999994736442e-08 -1e-07 -1e-07 1.0000001 1e-07 1e-07 0 2 1 -2 <br>
> 2 0.9999999000000001 -9.999999994736442e-08 -1e-07 1.0000001 1.0000001 1e-07 1 2 2 2 -3 <br>
> 3 -9.999999994736442e-08 0.9999999000000001 -1e-07 1.0000001 1.0000001 1e-07 0 2 3 -4 <br>
> 4 -1e-07 -9.999999994736442e-08 -1e-07 1e-07 1.0000001 1e-07 0 2 4 -1 <br>
> 1 -9.999999994736442e-08 -9.999999994736442e-08 -1e-07 1.0000001 1.0000001 1e-07 1 1 4 1 2 3 4 <br>
> $EndEntities<br>
> $Nodes<br>
> 9 21 1 46<br>
> 0 1 0 1<br>
> 1<br>
> 0 0 0<br>
> 0 2 0 1<br>
> 2<br>
> 1 0 0<br>
> 0 3 0 1<br>
> 3<br>
> 1 1 0<br>
> 0 4 0 1<br>
> 4<br>
> 0 1 0<br>
> 1 1 0 3<br>
> 5<br>
> 35<br>
> 36<br>
> 0.5 0 0<br>
> 0.25 0 0<br>
> 0.75 0 0<br>
> 1 2 0 3<br>
> 6<br>
> 37<br>
> 38<br>
> 1 0.5 0<br>
> 1 0.25 0<br>
> 1 0.75 0<br>
> 1 3 0 3<br>
> 7<br>
> 39<br>
> 40<br>
> 0.5 1 0<br>
> 0.75 1 0<br>
> 0.25 1 0<br>
> 1 4 0 3<br>
> 8<br>
> 41<br>
> 42<br>
> 0 0.5 0<br>
> 0 0.75 0<br>
> 0 0.25 0<br>
> 2 1 0 5<br>
> 9<br>
> 43<br>
> 44<br>
> 45<br>
> 46<br>
> 0.5 0.5 0<br>
> 0.75 0.5 0<br>
> 0.5 0.25 0<br>
> 0.25 0.5 0<br>
> 0.5 0.75 0<br>
> $EndNodes<br>
> $Elements<br>
> 2 6 197 206<br>
> 1 2 8 2<br>
> 197 2 6 37 <br>
> 198 6 3 38 <br>
> 2 1 16 4<br>
> 203 2 6 9 5 37 43 44 36 <br>
> 204 1 5 9 8 35 44 45 42 <br>
> 205 4 8 9 7 41 45 46 40 <br>
> 206 3 7 9 6 39 46 43 38 <br>
> $EndElements<br>
</blockquote></div><br clear="all"><div><br></div>-- <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>