# VecISCopy
Copies between a reduced vector and the appropriate elements of a full-space vector. 
## Synopsis
```
#include "petscvec.h"  
PetscErrorCode VecISCopy(Vec vfull, IS is, ScatterMode mode, Vec vreduced)
```

## Input Parameters

- ***vfull    -*** the full-space vector
- ***is       -*** the index set for the reduced space
- ***mode     -*** the direction of copying, SCATTER_FORWARD or SCATTER_REVERSE
- ***vreduced -*** the reduced-space vector



## Output Parameters

- ***vfull    -*** the sum of the full-space vector and reduced-space vector



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

mode == SCATTER_FORWARD: vfull[is[i]] = vreduced[i]
mode == SCATTER_REVERSE: vreduced[i] = vfull[is[i]]




## See Also
 `VecISSet()`, `VecISAXPY()`, `VecCopy()`

## Level
advanced

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

## Examples
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/snes/tutorials/ex13.c.html">src/snes/tutorials/ex13.c.html</A><BR>


---
[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)  
