:orphan: # DMStagGetNumRanks get number of ranks in each direction in the global grid decomposition ## Synopsis ``` PetscErrorCode DMStagGetNumRanks(DM dm, PetscInt *nRanks0, PetscInt *nRanks1, PetscInt *nRanks2) ``` Not Collective ## Input Parameter - ***dm -*** the `DMSTAG` object ## Output Parameters - ***nRanks0 -*** number of ranks in the x direction in the grid decomposition - ***nRanks1 -*** number of ranks in the y direction in the grid decomposition - ***nRanks2 -*** number of ranks in the z direction in the grid decomposition ## See Also [](ch_stag), `DMSTAG`, `DMStagGetGlobalSizes()`, `DMStagGetLocalSize()`, `DMStagSetNumRanks()`, `DMDAGetInfo()` ## Level intermediate ## Location src/dm/impls/stag/stagutils.c --- [Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/dm/impls/stag/stagutils.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)