:orphan:
# DMPlexCreateLabelField
Create a cell field whose value is the label value for that cell 
## Synopsis
```
#include "petscdmplex.h"   
PetscErrorCode DMPlexCreateLabelField(DM dm, DMLabel label, Vec *val)
```

## Input Parameters

- ***dm    -*** The `DMPLEX`
- ***label -*** The `DMLabel`



## Output Parameter

- ***val -*** The label value field



## Options Database Key

- ***-dm_label_view -*** Adds the label value field into the `DM` output from `-dm_view` using the same viewer





## See Also
 [](ch_unstructured), `DM`, `DMPLEX`, `DMView()`

## Level
intermediate

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/dm/impls/plex/plex.c.html#DMPlexCreateLabelField">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](/manualpages/index.md)  
[Index of all manual pages](/manualpages/singleindex.md)  
