Skip to main content
`Ctrl`+`K`

# 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

DM Basics, `DM`, `DMSetDimension()`, `DMCreate()`

## Level

beginner

## Location

src/dm/interface/dm.c

## Examples

src/dm/impls/plex/tutorials/ex14.c
src/dm/impls/plex/tutorials/ex14f90.F90
src/dm/impls/plex/tutorials/ex16.c
src/dm/impls/plex/tutorials/ex18.c
src/dm/impls/plex/tutorials/ex10.c
src/dm/impls/plex/tutorials/ex6.c
src/dm/field/tutorials/ex1.c
src/dm/impls/plex/tutorials/ex1.c
src/dm/impls/plex/tutorials/ex17.c
src/dm/impls/plex/tutorials/ex15.c

Index of all DM routines
Table of Contents for all manual pages
Index of all manual pages