DMPlexSetClosurePermutationTensor#
Create a permutation from the default (BFS) point ordering in the closure, to a lexicographic ordering over the tensor product cell (i.e., line, quad, hex, etc.), and set this permutation in the section provided (or the section of the DM
).
Synopsis#
#include "petscdmplex.h"
PetscErrorCode DMPlexSetClosurePermutationTensor(DM dm, PetscInt point, PetscSection section)
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, orNULL
for the default section
Example#
A typical interpolated single-quad mesh might order points as
[c0, v1, v2, v3, v4, e5, e6, e7, e8]
v4 -- e6 -- v3
| |
e7 c0 e8
| |
v1 -- e5 -- v2
(There is no significance to the ordering described here.) The default section for a Q3 quad might typically assign dofs in the order of points, e.g.,
c0 -> [0,1,2,3]
v1 -> [4]
...
e5 -> [8, 9]
which corresponds to the dofs
6 10 11 7
13 2 3 15
12 0 1 14
4 8 9 5
The closure in BFS ordering works through height strata (cells, edges, vertices) to produce the ordering
0 1 2 3 8 9 14 15 11 10 13 12 4 5 7 6
After calling DMPlexSetClosurePermutationTensor(), the closure will be ordered lexicographically,
4 8 9 5 12 0 1 14 13 2 3 15 6 10 11 7
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.
This is required to run with libCEED.
See Also#
DMPlex: Unstructured Grids, DM
, DMPLEX
, DMGetLocalSection()
, PetscSectionSetClosurePermutation()
, DMSetGlobalSection()
Level#
developer
Location#
Examples#
src/dm/impls/plex/tutorials/ex6.c
src/dm/impls/plex/tutorials/ex8.c
Index of all DMPlex routines
Table of Contents for all manual pages
Index of all manual pages