:orphan:
# VecNestGetSubVecs
Returns the entire array of vectors defining a nest vector. 
## Synopsis
```
#include "petscvec.h"   
PetscErrorCode VecNestGetSubVecs(Vec X, PetscInt *N, Vec **sx)
```
Not Collective


## Input Parameter

- ***X  -*** nest vector



## Output Parameters

- ***N -*** number of nested vecs
- ***sx -*** array of vectors





## Note
The user should not free the array `sx`.


## Fortran Note
The caller must allocate the array to hold the subvectors.


## See Also
 `VECNEST`,  [](ch_vectors), `Vec`, `VecType`, `VecNestGetSize()`, `VecNestGetSubVec()`

## Level
developer

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/vec/vec/impls/nest/vecnest.c.html#VecNestGetSubVecs">src/vec/vec/impls/nest/vecnest.c</A>

## Implementations

<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/vec/vec/impls/nest/vecnest.c.html#VecNestGetSubVecs_Nest">VecNestGetSubVecs_Nest in src/vec/vec/impls/nest/vecnest.c</A><BR>


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


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