# DMPlexComputeCellTypes
Infer the polytope type of every cell using its dimension and cone size. 
## Synopsis
```
#include "petscdmplex.h"   
PetscErrorCode DMPlexComputeCellTypes(DM dm)
```
Collective on dm


## Input Parameter

- ***mesh -*** The `DMPLEX`





## Note
This function is normally called automatically when a cell type is requested. It creates an
internal `DMLabel` named "celltype" which can be directly accessed using `DMGetLabel()`. A user may disable
automatic creation by creating the label manually, using `DMCreateLabel`(dm, "celltype").

`DMPlexComputeCellTypes()` should be called after all calls to `DMPlexSymmetrize()` and `DMPlexStratify()`


## See Also
 [](chapter_unstructured), `DM`, `DMPLEX`, `DMPlexCreate()`, `DMPlexSymmetrize()`, `DMPlexStratify()`, `DMGetLabel()`, `DMCreateLabel()`

## Level
developer

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


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/dm/impls/plex/plex.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)  
