:orphan: # DMSwarmGetNumSpecies Get the number of particle species ## Synopsis ``` #include "petscdmswarm.h" PetscErrorCode DMSwarmGetNumSpecies(DM sw, PetscInt *Ns) ``` Not Collective ## Input parameter - ***dm -*** the `DMSWARM` ## Output parameters - ***Ns -*** the number of species ## See Also `DMSWARM`, `DMSwarmSetNumSpecies()`, `DMSwarmSetType()`, `DMSwarmType` ## Level intermediate ## Location src/dm/impls/swarm/swarmpic.c --- [Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/dm/impls/swarm/swarmpic.c) [Index of all DMSwarm routines](index.md) [Table of Contents for all manual pages](/manualpages/index.md) [Index of all manual pages](/manualpages/singleindex.md)