DMPlexCreateColoring#

Gets coloring of the connectivity graph of the DMPlex points at a given depth.

Synopsis#

#include "petscdmplex.h"   
PetscErrorCode DMPlexCreateColoring(DM dm, PetscInt depth, PetscInt distance, ISColoring *coloring)

Collective

Input Parameters#

  • dm - the DMPlex object

  • depth - the dimension of the entities in the connectivity graph.

  • distance - the distance of the coloring (either 1 or 2).

Output Parameter#

  • coloring - the coloring

Notes#

Unlike DMCreateColoring, the graph used for the coloring does not represent the operator matrix associated with the discretization of a PDE on the DM. Here the coloring is computed from the connectivity graph of the mesh entities, defined with FEM adjacency if depth < dim, and with FVM adjacency if depth == dim.

Coloring of matrices can also be computed directly from the sparse matrix nonzero structure via the MatColoring object or from the mesh from which the matrix comes from (what this function provides). In general using the mesh produces a more optimal coloring (fewer colors).

Mesh colorings are useful for additive and multiplicative Schwarz methods. In particular, they mitigate overhead costs associated with setting up individual KSPs and PCs on many subdomains per process. A coloring of the vertices (depth=0) with distance=1 can be use can be used to group non-overlapping vertex-star patches into multi-patch subdomains. Similarly, a vertex coloring with distance=2 can be used to group non-overlapping Vanka patches into multi-patch subdomains.

See Also#

DMPlex: Unstructured Grids, DMPlex, ISColoring, MatColoring, DMCreateColoring()

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