:orphan: # DMGetDimension Return the topological dimension of the `DM` ## Synopsis ``` #include "petscdm.h" #include "petscdmlabel.h" #include "petscds.h" PetscErrorCode DMGetDimension(DM dm, PetscInt *dim) ``` Not Collective ## Input Parameter - ***dm -*** The `DM` ## Output Parameter - ***dim -*** The topological dimension ## See Also [](ch_dmbase), `DM`, `DMSetDimension()`, `DMCreate()` ## Level beginner ## Location src/dm/interface/dm.c ## Examples src/dm/field/tutorials/ex1.c
src/dm/impls/plex/tutorials/ex1.c
src/dm/impls/plex/tutorials/ex10.c
src/dm/impls/plex/tutorials/ex14.c
src/dm/impls/plex/tutorials/ex1f90.F90
src/dm/impls/plex/tutorials/ex6.c
src/dm/impls/plex/tutorials/ex8.c
src/dm/impls/stag/tutorials/ex4.c
src/dm/impls/stag/tutorials/ex8.c
src/dm/impls/swarm/tutorials/ex1.c
src/dm/impls/swarm/tutorials/ex1f90.F90
--- [Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/dm/interface/dm.c) [Index of all DM routines](index.md) [Table of Contents for all manual pages](/manualpages/index.md) [Index of all manual pages](/manualpages/singleindex.md)