# DMCompositeGetLocalAccessArray
Allows one to access the individual packed vectors in their local representation. 
## Synopsis
```
#include "petscdmcomposite.h"  
PetscErrorCode DMCompositeGetLocalAccessArray(DM dm, Vec pvec, PetscInt nwanted, const PetscInt *wanted, Vec *vecs)
```
Collective on dm.


## Input Parameters

- ***dm -*** the `DMCOMPOSITE`
- ***pvec -*** packed vector
- ***nwanted -*** number of vectors wanted
- ***wanted -*** sorted array of vectors wanted, or NULL to get all vectors



## Output Parameters

- ***vecs -*** array of requested local vectors (must be allocated)





## Note
Use `DMCompositeRestoreLocalAccessArray()` to return the vectors
when you no longer need them.


## See Also
 `DMCOMPOSITE`, `DM`, `DMCompositeRestoreLocalAccessArray()`, `DMCompositeGetAccess()`,
`DMCompositeGetEntries()`, `DMCompositeScatter()`, `DMCompositeGather()`

## Level
advanced

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/dm/impls/composite/pack.c.html#DMCompositeGetLocalAccessArray">src/dm/impls/composite/pack.c</A>


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


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