DMPlexGetOrdering#

Calculate a reordering of the mesh

Synopsis#

#include "petscdmplex.h"   
#include "petscmat.h"      
PetscErrorCode DMPlexGetOrdering(DM dm, MatOrderingType otype, DMLabel label, IS *perm)

Collective

Input Parameters#

  • dm - The DMPLEX object

  • otype - type of reordering, see MatOrderingType; DMPLEXCURVEMORTON selects a space-filling curve

  • label - [Optional] Label used to segregate ordering into sets, or NULL

Output Parameter#

  • perm - The point permutation as an IS, perm[old point number] = new point number

Note#

The label is used to group sets of points together by label value. This makes it easy to reorder a mesh which has different types of cells, and then loop over each set of reordered cells for assembly.

Passing DMPLEXCURVEMORTON orders the cells along a Morton (Z-order) curve computed from the cell centroids. This requires the DMPLEX to have coordinates. It needs no adjacency graph. Every other value currently gives reverse Cuthill-McKee.

See Also#

DMPLEX, DMPlexPermute(), MatOrderingType, MatGetOrdering()

Level#

intermediate

Location#

src/dm/impls/plex/plexreorder.c

Examples#

src/dm/impls/plex/tests/ex10.c
src/dm/impls/plex/tests/ex106.c


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