:orphan:
# DMRestoreWorkArray
Restores a work array obtained with `DMCreateWorkArray()` 
## Synopsis
```
#include "petscdm.h"          
#include "petscdmlabel.h"     
#include "petscds.h"     
PetscErrorCode DMRestoreWorkArray(DM dm, PetscInt count, MPI_Datatype dtype, void *mem)
```
Not Collective


## Input Parameters

- ***dm -*** the `DM` object
- ***count -*** The minimum size
- ***dtype -*** MPI data type, often `MPIU_REAL`, `MPIU_SCALAR`, `MPIU_INT`



## Output Parameter

- ***array -*** the work array





## Developer Note
count and dtype are ignored, they are only needed for `DMGetWorkArray()`


## See Also
 [](ch_dmbase), `DM`, `DMDestroy()`, `DMCreate()`, `DMGetWorkArray()`

## Level
developer

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/dm/interface/dm.c.html#DMRestoreWorkArray">src/dm/interface/dm.c</A>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/dm/interface/dm.c)


[Index of all DM routines](index.md)  
[Table of Contents for all manual pages](/manualpages/index.md)  
[Index of all manual pages](/manualpages/singleindex.md)  
