DMPlexSetClosurePermutationLexicographic#

Create a permutation from the default (BFS) point ordering in the closure, to a lexicographic ordering over the simplex (i.e., line, tri, tet, etc.), and set this permutation in the section provided (or the section of the DM).

Synopsis#

Not Collective

Input Parameters#

  • dm - The DM

  • point - Either a cell (highest dim point) or an edge (dim 1 point), or PETSC_DETERMINE

  • section - The PetscSection to reorder, or NULL for the default section

Example#

A typical interpolated single-tri mesh might order points as

  [c0, v1, v2, v3, e4, e5, e6]

  v3
  |  \
  |    \
  e6    e5
  |  c0   \
  |         \
  v1 -- e4 -- v2

(There is no significance to the ordering described here.) The default section for a P3 tri might typically assign dofs in the order of points, e.g.,

    c0 -> [0]
    v1 -> [1]
    ...
    e4 -> [4, 5]

which corresponds to the dofs

    3
    8  7
    9  0   6
    1  4   5   2

The closure in BFS ordering works through height strata (cells, edges, vertices) to produce the ordering

  0 4 5 6 7 8 9 1 2 3

After calling DMPlexSetClosurePermutationLexicographic(), the closure will be ordered lexicographically,

   1 4 5 2 9 0 6 8 7 3

Notes#

The point is used to determine the number of dofs/field on an edge. For SEM, this is related to the polynomial degree of the basis.

The lexicographic order starts along the left edge, not the front, to match codes like GMsh with a bottom face oriented into the volume.

See Also#

DMPlex: Unstructured Grids, DM, DMPLEX, DMGetLocalSection(), PetscSectionSetClosurePermutation(), DMPlexSetClosurePermutationTensor(), DMSetGlobalSection()

Level#

developer

Location#

src/dm/impls/plex/plex.c


Index of all DMPlex routines
Table of Contents for all manual pages
Index of all manual pages