Skip to main content
`Ctrl`+`K`

# DMSetDimension

Set the topological dimension of the `DM`

## Synopsis

    #include "petscdm.h"
    #include "petscdmlabel.h"
    #include "petscds.h"
    PetscErrorCode DMSetDimension(DM dm, PetscInt dim)

Collective

## Input Parameters

- dm - The `DM`

- dim - The topological dimension

## See Also

DM Basics, `DM`, `DMGetDimension()`, `DMCreate()`

## Level

beginner

## Location

src/dm/interface/dm.c

## Examples

src/dm/impls/plex/tutorials/ex3f90.F90
src/ksp/ksp/tutorials/ex70.c
src/dm/impls/swarm/tutorials/ex1f90.F90
src/snes/tutorials/ex63.c
src/dm/tutorials/ex19.c
src/dm/tutorials/ex20.c
src/ts/tutorials/ex11_sa.c
src/dm/impls/swarm/tutorials/ex1.c
src/dm/tutorials/swarm_ex3.c
src/dm/tutorials/ex21.c

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