# DMStagGetLocationDOF
Get number of DOF associated with a given point in a `DMSTAG` grid 
## Synopsis
```
PetscErrorCode DMStagGetLocationDOF(DM dm, DMStagStencilLocation loc, PetscInt *dof)
```
Not Collective


## Input Parameters

- ***dm -*** the `DMSTAG` object
- ***loc -*** grid point (see `DMStagStencilLocation`)



## Output Parameter

- ***dof -*** the number of DOF (components) living at `loc` in `dm`





## See Also
 [](chapter_stag), `DMSTAG`, `DMStagStencilLocation`, `DMStagStencil`, `DMDAGetDof()`

## Level
intermediate

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/dm/impls/stag/stagstencil.c.html#DMStagGetLocationDOF">src/dm/impls/stag/stagstencil.c</A>


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


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