Skip to content

DMPlex: fix isoperiodic coordinate projection for high order elements

Jed Brown requested to merge jed/plex-isoperiodic-coord-projection into main

This fixes a failure to fill in periodic cells, the simplest example of which is:

$ $PETSC_ARCH/tests/dm/impls/plex/tests/ex49 -dm_plex_simplex 0 -dm_plex_dim 1 -dm_plex_shape zbox -dm_plex_box_faces 1 -petscspace_degree 1 -dm_plex_box_bd periodic -closure_tensor -dm_coord_petscspace_degree 2
## cells: 'default' {0}
Coordinates by element in tensor order
[0] 0 <--  1 ( 0.00)
[0] 1 <--  0 ( 0.00)
[0] 2 <--  2 ( 1.00)

Note that this occurs automatically in CGNS writing because it has a projection to colloc_dm if the solution degree differs from the coordinate degree.

This also fixes a bug in isoperiodic affine setup when multiple nodes appear on the same topological point (cubic elements and above).

With this MR, Paraview can use our CGNS files to render cubic basis functions with isoperiodicity, as in this clip.

w-sfc-per-q3

Thanks @tisaac for the conversation today.

Edited by Jed Brown

Merge request reports