:orphan:
# TaoVecGetSubVec
Gets a subvector using the IS 
## Synopsis
```
#include "petsctao.h" 
PetscErrorCode TaoVecGetSubVec(Vec vfull, IS is, TaoSubsetType reduced_type, PetscReal maskvalue, Vec *vreduced)
```

## Input Parameters

- ***vfull -*** the full matrix
- ***is -*** the index set for the subvector
- ***reduced_type -*** the method TAO is using for subsetting (TAO_SUBSET_SUBVEC, TAO_SUBSET_MASK,  TAO_SUBSET_MATRIXFREE)
- ***maskvalue -*** the value to set the unused vector elements to (for TAO_SUBSET_MASK or TAO_SUBSET_MATRIXFREE)



## Output Parameter

- ***vreduced -*** the subvector



## Notes
maskvalue should usually be 0.0, unless a pointwise divide will be used.



## Level
developer

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/tao/bound/utils/isutil.c.html#TaoVecGetSubVec">src/tao/bound/utils/isutil.c</A>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/tao/bound/utils/isutil.c)


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