:orphan: # VecSetLocalToGlobalMapping Sets a local numbering to global numbering used by the routine `VecSetValuesLocal()` to allow users to insert vector entries using a local (per-processor) numbering. ## Synopsis ``` #include "petscvec.h" PetscErrorCode VecSetLocalToGlobalMapping(Vec x, ISLocalToGlobalMapping mapping) ``` Logically Collective ## Input Parameters - ***x -*** vector - ***mapping -*** mapping created with `ISLocalToGlobalMappingCreate()` or `ISLocalToGlobalMappingCreateIS()` ## Notes All vectors obtained with `VecDuplicate()` from this vector inherit the same mapping. Vectors obtained with `DMCreateGlobaVector()` will often have this attribute attached to the vector so this call is not needed ## See Also [](ch_vectors), `Vec`, `VecAssemblyBegin()`, `VecAssemblyEnd()`, `VecSetValues()`, `VecSetValuesLocal()`, `VecGetLocalToGlobalMapping()`, `VecSetValuesBlockedLocal()` ## Level intermediate ## Location src/vec/vec/interface/vector.c ## Examples src/ksp/ksp/tutorials/ex71.c
src/vec/vec/tutorials/ex8.c
src/vec/vec/tutorials/ex8f.F90
--- [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)