[petsc-users] 20-node hexes

Matthew Knepley knepley at gmail.com
Wed Mar 25 04:54:04 CDT 2026


On Wed, Mar 25, 2026 at 4:51 AM Noam T. via petsc-users <
petsc-users at mcs.anl.gov> 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_uCfscf7eWS!fmdgmR8_axS6DJ93AuPyevdHxx6X2NwEb7MsORSO5Mlpe9mhVBH8GcCK79-kHJODbwn83qenIi4-J6gg_GTQ$  <https://urldefense.us/v3/__http://www.cse.buffalo.edu/*knepley/__;fg!!G_uCfscf7eWS!fmdgmR8_axS6DJ93AuPyevdHxx6X2NwEb7MsORSO5Mlpe9mhVBH8GcCK79-kHJODbwn83qenIi4-J4gcqp_7$ >
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20260325/0aca7d32/attachment.html>


More information about the petsc-users mailing list