:orphan:
# 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
 [](ch_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](/manualpages/index.md)  
[Index of all manual pages](/manualpages/singleindex.md)  
