:orphan:
# Vec
Abstract PETSc vector object
## Synopsis
```
typedef struct _p_Vec *Vec;
```
## See Also
[](doc_vector), [](ch_vectors), `VecCreate()`, `VecType`, `VecSetType()`
## Level
beginner
## Location
include/petscvec.h
## Examples
src/dm/impls/stag/tutorials/ex2.c
src/dm/impls/stag/tutorials/ex3.c
src/dm/impls/stag/tutorials/ex4.c
src/dm/impls/stag/tutorials/ex6.c
src/dm/tutorials/ex10.c
src/dm/tutorials/ex13f90aux.F90
src/ksp/ksp/tutorials/ex10.c
src/ksp/ksp/tutorials/ex15.c
src/ksp/ksp/tutorials/ex25.c
src/ksp/ksp/tutorials/ex28.c
src/ksp/ksp/tutorials/ex29.c
## Implementations
_p_Vec in include/petsc/private/vecimpl.h
---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/include/petscvec.h)
[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)