# DMSwarmSortGetSizes
Gets the sizes associated with a DMSwarm point sorting context 
## Synopsis
```
PETSC_EXTERN PetscErrorCode DMSwarmSortGetSizes(DM dm, PetscInt *ncells, PetscInt *npoints)
```
Not collective


## Input parameter

- ***dm -*** a DMSwarm object



## Output parameters

- ***ncells -*** number of cells within the sort context (pass NULL to ignore)
- ***npoints -*** number of points used to create the sort context (pass NULL to ignore)





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

## Level
advanced

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


---
[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)  
