:orphan: # VecGetType Gets the vector type name (as a string) from a `Vec`. ## Synopsis ``` #include "petscvec.h" PetscErrorCode VecGetType(Vec vec, VecType *type) ``` Not Collective ## Input Parameter - ***vec -*** The vector ## Output Parameter - ***type -*** The `VecType` of the vector ## See Also [](ch_vectors), `Vec`, `VecType`, `VecGetType()`, `VecCreate()`, `VecDuplicate()`, `VecDuplicateVecs()` ## Level intermediate ## Location src/vec/vec/interface/vecreg.c ## Examples src/ksp/ksp/tutorials/ex73.c
src/snes/tutorials/ex7.c
src/vec/vec/tutorials/ex1f.F90
--- [Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/vec/vec/interface/vecreg.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)