Skip to main content
`Ctrl`+`K`

# DMDARestoreElements

Restores the array obtained with `DMDAGetElements()`

## Synopsis

    #include "petscdmda.h"
    PetscErrorCode DMDARestoreElements(DM dm, PetscInt *nel, PetscInt *nen, const PetscInt *e[])

Not Collective

## Input Parameters

- dm - the `DM` object

- nel - number of local elements

- nen - number of nodes in each element

- e - the local indices of the elements’ vertices

## Note

This restore signals the `DMDA` object that you no longer need access to the array information.

## See Also

DMDA - Creating vectors for structured grids, `DM`, `DMDA`, `DMDAElementType`, `DMDASetElementType()`, `DMDAGetElements()`

## Level

intermediate

## Location

src/dm/impls/da/dagetelem.c

## Examples

src/ksp/ksp/tutorials/ex71.c
src/ksp/ksp/tutorials/ex70.c
src/dm/tutorials/ex11f90.F90
src/dm/tutorials/ex5.c

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