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
DMPlexobjectdepth - the dimension of the entities in the connectivity graph.
distance - how far through the mesh a point reaches, in applications of the adjacency (1 for a star, 2 for its closure).
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.
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 with distance=1 groups non-overlapping star patches into multi-patch subdomains, and one with distance=2
groups non-overlapping Vanka patches, whose reach is the closure of a star. Either works at any depth.
This colors the whole stratum. Use DMPlexCreateColoringLabel() to color a subset of it, and see that routine for
the options controlling the ordering and hence the number of colors.
See Also#
DMPlex: Unstructured Grids, DMPlex, ISColoring, MatColoring, DMCreateColoring(), DMPlexCreateColoringLabel()
Level#
developer
Location#
Examples#
src/dm/impls/plex/tests/ex104.c
Index of all DMPlex routines
Table of Contents for all manual pages
Index of all manual pages