# DMPlexCreateNeighborCSR
Create a mesh graph (cell-cell adjacency) in parallel CSR format. 
## Synopsis
```
#include "petscdmplex.h"   
PetscErrorCode DMPlexCreateNeighborCSR(DM dm, PetscInt cellHeight, PetscInt *numVertices, PetscInt **offsets, PetscInt **adjacency)
```
Collective on dm


## Input Parameters

- ***dm -*** The `DMPLEX`
- ***cellHeight -*** The height of mesh points to treat as cells (default should be 0)



## Output Parameters

- ***numVertices -*** The number of local vertices in the graph, or cells in the mesh.
- ***offsets     -*** The offset to the adjacency list for each cell
- ***adjacency   -*** The adjacency list for all cells





## Note
This is suitable for input to a mesh partitioner like ParMetis.


## See Also
 [](chapter_unstructured), `DM`, `DMPLEX`, `DMPlexCreate()`

## Level
advanced

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/dm/impls/plex/plexpartition.c.html#DMPlexCreateNeighborCSR">src/dm/impls/plex/plexpartition.c</A>

## Examples
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ts/tutorials/ex11_sa.c.html">src/ts/tutorials/ex11_sa.c.html</A><BR>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/dm/impls/plex/plexpartition.c)


[Index of all DMPlex routines](index.md)  
[Table of Contents for all manual pages](/docs/manualpages/index.md)  
[Index of all manual pages](/docs/manualpages/singleindex.md)  
