:orphan: # VecGetOwnershipRange Returns the range of indices owned by this process. The vector is laid out with the first n1 elements on the first processor, next n2 elements on the second, etc. For certain parallel layouts this range may not be well defined. ## Synopsis ``` #include "petscvec.h" PetscErrorCode VecGetOwnershipRange(Vec x, PetscInt *low, PetscInt *high) ``` Not Collective ## Input Parameter - ***x -*** the vector ## Output Parameters - ***low -*** the first local element, pass in `NULL` if not interested - ***high -*** one more than the last local element, pass in `NULL` if not interested ## Note The high argument is one more than the last element stored locally. ## Fortran Note `PETSC_NULL_INTEGER` should be used instead of NULL ## See Also [](ch_vectors), `Vec`, `MatGetOwnershipRange()`, `MatGetOwnershipRanges()`, `VecGetOwnershipRanges()` ## Level beginner ## Location src/vec/vec/interface/vector.c ## Examples src/dm/tutorials/ex22.c
src/dm/tutorials/ex6.c
src/ksp/ksp/tutorials/ex10.c
src/ksp/ksp/tutorials/ex23.c
src/ksp/ksp/tutorials/ex3.c
src/ksp/ksp/tutorials/ex49.c
src/ksp/ksp/tutorials/ex5.c
src/ksp/ksp/tutorials/ex5f.F90
src/ksp/ksp/tutorials/ex71.c
src/ksp/ksp/tutorials/ex72.c
src/ksp/ksp/tutorials/ex73.c
--- [Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/vec/vec/interface/vector.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)