DMPlexCreatePartitionerGraph — PETSc 3.23.0 documentation

Skip to main content
`Ctrl`+`K`

# DMPlexCreatePartitionerGraph

Create a CSR graph of point connections for the partitioner

## Synopsis

    #include "petscdmplex.h"
    PetscErrorCode DMPlexCreatePartitionerGraph(DM dm, PetscInt height, PetscInt *numVertices, PetscInt **offsets, PetscInt **adjacency, IS *globalNumbering)

Collective

## Input Parameters

- dm - The mesh `DM`

- height - Height of the strata from which to construct the graph

## Output Parameters

- numVertices - Number of vertices in the graph

- offsets - Point offsets in the graph

- adjacency - Point connectivity in the graph

- globalNumbering - A map from the local cell numbering to the global numbering used in “adjacency”. Negative indicates that the cell is a duplicate from another process.

## Options Database Key

- -dm_plex_csr_alg <mat,graph,overlap> - Choose the algorithm for computing the CSR graph

## Note

The user can control the definition of adjacency for the mesh using `DMSetAdjacency()`. They should choose the combination appropriate for the function representation on the mesh. If requested, globalNumbering needs to be destroyed by the caller; offsets and adjacency need to be freed with PetscFree().

## See Also

DMPlex: Unstructured Grids, `DM`, `DMPLEX`, `PetscPartitionerGetType()`, `PetscPartitionerCreate()`, `DMSetAdjacency()`

## Level

developer

## Location

src/dm/impls/plex/plexpartition.c

## Implementations

DMPlexCreatePartitionerGraph_Overlap() in src/dm/impls/plex/plexpartition.c
DMPlexCreatePartitionerGraph_Native() in src/dm/impls/plex/plexpartition.c
DMPlexCreatePartitionerGraph_ViaMat() in src/dm/impls/plex/plexpartition.c

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