# VecSetPreallocationCOOLocal
set preallocation for vectors using a coordinate format of the entries with local indices 
## Synopsis
```
#include "petscvec.h"   
PetscErrorCode VecSetPreallocationCOOLocal(Vec x, PetscCount ncoo, PetscInt coo_i[])
```
Collective on Mat


## Input Parameters

- ***x -*** vector being preallocated
- ***ncoo -*** number of entries
- ***coo_i -*** row indices (local numbering; may be modified)





## Notes
The local indices are translated using the local to global mapping, thus VecSetLocalToGlobalMapping() must have been
called prior to this function.

The indices coo_i may be modified within this function. They might be translated to corresponding global
indices, but the caller should not rely on them having any specific value after this function returns. The arrays
can be freed or reused immediately after this function returns.

Entries can be repeated. Negative indices and remote indices might be allowed. see VecSetPreallocationCOO().


## See Also
 VecSetPreallocationCOO(), VecSetValuesCOO()

## Level
beginner

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/vec/vec/interface/vector.c.html#VecSetPreallocationCOOLocal">src/vec/vec/interface/vector.c</A>


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


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