# VecISSet
Sets the elements of a vector, specified by an index set, to a constant 
## Synopsis
```
#include "petscvec.h"  
PetscErrorCode VecISSet(Vec V, IS S, PetscScalar c)
```

## Input Parameters

- ***V -*** the vector
- ***S -*** index set for the locations in the vector
- ***c -*** the constant



## Notes
The index set identifies entries in the global vector.
Negative indices are skipped; indices outside the ownership range of V will raise an error.




## See Also
 `VecISCopy()`, `VecISAXPY()`, `VecSet()`

## Level
advanced

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/vec/vec/utils/projection.c.html#VecISSet">src/vec/vec/utils/projection.c</A>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/vec/vec/utils/projection.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)  
