Skip to main content
`Ctrl`+`K`

# DMDASetElementType

Sets the element type to be returned by `DMDAGetElements()`

## Synopsis

    #include "petscdmda.h"
    PetscErrorCode DMDASetElementType(DM da, DMDAElementType etype)

Not Collective

## Input Parameter

- da - the `DMDA` object

## Output Parameter

- etype - the element type, currently either `DMDA_ELEMENT_P1` or `DMDA_ELEMENT_Q1`

## See Also

DMDA - Creating vectors for structured grids, `DM`, `DMDA`, `DMDAElementType`, `DMDAGetElementType()`, `DMDAGetElements()`, `DMDARestoreElements()`, `DMDA_ELEMENT_P1`, `DMDA_ELEMENT_Q1`

## Level

intermediate

## Location

src/dm/impls/da/dagetelem.c

## Examples

src/dm/tutorials/ex21.c
src/dm/tutorials/ex5.c
src/dm/tutorials/ex20.c
src/ksp/ksp/tutorials/ex71.c
src/ksp/ksp/tutorials/ex70.c

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