<div dir="ltr"><div dir="ltr">On Wed, Mar 25, 2026 at 4:51 AM Noam T. via petsc-users <<a href="mailto:petsc-users@mcs.anl.gov">petsc-users@mcs.anl.gov</a>> wrote:</div><div class="gmail_quote gmail_quote_container"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="font-family:Arial,sans-serif;font-size:14px;color:rgb(0,0,0);background-color:rgb(255,255,255)">Hello,</div><div style="font-family:Arial,sans-serif;font-size:14px;color:rgb(0,0,0);background-color:rgb(255,255,255)"><br></div><div style="font-family:Arial,sans-serif;font-size:14px;color:rgb(0,0,0);background-color:rgb(255,255,255)">Is it possible to build/use a mesh consisting of 20-node hexes in PETSc? </div><div style="font-family:Arial,sans-serif;font-size:14px;color:rgb(0,0,0);background-color:rgb(255,255,255)"><br></div><div style="font-family:Arial,sans-serif;font-size:14px;color:rgb(0,0,0);background-color:rgb(255,255,255)">I tried reading (-dm_plex_filename) an existing mesh, with a 20-node cube, from gmsh (using the option "SecondOrderIncomplete"); statistics show 20 nodes, however the "Entities" section still only contains 8 vertices, so that may not work here.</div><div style="font-family:Arial,sans-serif;font-size:14px;color:rgb(0,0,0);background-color:rgb(255,255,255)"><br></div><div style="font-family:Arial,sans-serif;font-size:14px;color:rgb(0,0,0);background-color:rgb(255,255,255)">Using -petscdualspace_lagrange_XYZ I could not achieve this either.</div><div style="font-family:Arial,sans-serif;font-size:14px;color:rgb(0,0,0);background-color:rgb(255,255,255)"><br></div><div style="font-family:Arial,sans-serif;font-size:14px;color:rgb(0,0,0);background-color:rgb(255,255,255)">I searched some old threads in the mailing list; there are a couple, but they don't specify how they build it; they just mention they are using such mesh.</div><div style="font-family:Arial,sans-serif;font-size:14px;color:rgb(0,0,0);background-color:rgb(255,255,255)"><br></div><div style="font-family:Arial,sans-serif;font-size:14px;color:rgb(0,0,0);background-color:rgb(255,255,255)">Searching for "serendipity" in the documentation did not return anything either. </div></blockquote><div><br></div><div>No, PETSc cannot represent the serendipity space. You can create a PetscSection that has this data layout, so you can hold vectors with these solutions, do local to global, etc, but Plex cannot compute residuals.</div><div><br></div><div>Firedrake has these elements.</div><div><br></div><div>The argument for serendipity elements is that they save computation, but in doing so they give up opportunities for optimization (like vectorization) and they are slightly less accurate. I have never seen them win in time to solution.</div><div><br></div><div>  Thanks,</div><div><br></div><div>      Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="font-family:Arial,sans-serif;font-size:14px;color:rgb(0,0,0);background-color:rgb(255,255,255)">Thanks,</div></blockquote></div><div><br clear="all"></div><div><br></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="https://urldefense.us/v3/__http://www.cse.buffalo.edu/*knepley/__;fg!!G_uCfscf7eWS!fmdgmR8_axS6DJ93AuPyevdHxx6X2NwEb7MsORSO5Mlpe9mhVBH8GcCK79-kHJODbwn83qenIi4-J4gcqp_7$" target="_blank">https://www.cse.buffalo.edu/~knepley/</a><br></div></div></div></div></div></div></div></div>