On Wed, Mar 25, 2026 at 4:51 AM Noam T. via petsc-users < [email protected]> wrote:
Hello,
Is it possible to build/use a mesh consisting of 20-node hexes in PETSc?
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.
Using -petscdualspace_lagrange_XYZ I could not achieve this either.
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.
Searching for "serendipity" in the documentation did not return anything either.
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. Firedrake has these elements. 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. Thanks, Matt
Thanks,
-- What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead. -- Norbert Wiener https://urldefense.us/v3/__https://www.cse.buffalo.edu/*knepley/__;fg!!G_uCf... <https://urldefense.us/v3/__http://www.cse.buffalo.edu/*knepley/__;fg!!G_uCfs... >