# DMSwarmSortGetNumberOfPointsPerCell
Returns the number of points in a cell 
## Synopsis
```
PetscErrorCode DMSwarmSortGetNumberOfPointsPerCell(DM dm, PetscInt e, PetscInt *npoints)
```
Not collective


## Input parameters

- ***dm -*** a DMSwarm objects
- ***e -*** the index of the cell
- ***npoints -*** the number of points in the cell





## Notes
You must call DMSwarmSortGetAccess() before you can call DMSwarmSortGetNumberOfPointsPerCell()


## See Also
 `DMSwarmSetType()`, `DMSwarmSortGetAccess()`, `DMSwarmSortGetPointsPerCell()`

## Level
advanced

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/dm/impls/swarm/swarmpic_sort.c.html#DMSwarmSortGetNumberOfPointsPerCell">src/dm/impls/swarm/swarmpic_sort.c</A>

## Examples
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/dm/tutorials/ex20.c.html">src/dm/tutorials/ex20.c.html</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/ksp/tutorials/ex70.c.html">src/ksp/ksp/tutorials/ex70.c.html</A><BR>


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


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