PETSc version 3.17.0
Fix/Edit manual page

# DMSetType

Builds a DM, for a particular DM implementation.

### Synopsis

    #include "petscdm.h"
    #include "petscdmlabel.h"
    #include "petscds.h"
    PetscErrorCode  DMSetType(DM dm, DMType method)

Collective on dm

### Input Parameters

| dm | - The DM object
| method | - The name of the DM type

### Options Database Key

| -dm_type <type> | - Sets the DM type; use -help for a list of available types

### Notes

See "petsc/include/petscdm.h" for available DM types (for instance, DM1D, DM2D, or DM3D).

### See Also

DMGetType(), DMCreate()

### Level

intermediate

### Location

src/dm/interface/dm.c

### Examples

src/dm/impls/plex/tutorials/ex1.c.html
src/dm/impls/plex/tutorials/ex5.c.html
src/dm/impls/plex/tutorials/ex6.c.html
src/dm/impls/plex/tutorials/ex7.c.html
src/dm/impls/plex/tutorials/ex8.c.html
src/dm/impls/plex/tutorials/ex9.c.html
src/dm/impls/plex/tutorials/ex10.c.html
src/dm/impls/plex/tutorials/ex11.c.html
src/dm/impls/plex/tutorials/ex1f90.F90.html
src/dm/impls/forest/tutorials/ex1.c.html
src/dm/tutorials/ex20.c.html
Index of all DM routines
Table of Contents for all manual pages
Index of all manual pages