:orphan: # VecAssemblyBegin Begins assembling the vector; that is ensuring all the vector's entries are stored on the correct MPI process. This routine should be called after completing all calls to `VecSetValues()`. ## Synopsis ``` #include "petscvec.h" PetscErrorCode VecAssemblyBegin(Vec vec) ``` Collective ## Input Parameter - ***vec -*** the vector ## See Also [](ch_vectors), `Vec`, `VecAssemblyEnd()`, `VecSetValues()` ## Level beginner ## Location src/vec/vec/interface/vector.c ## Examples src/dm/impls/stag/tutorials/ex1.c
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/impls/stag/tutorials/ex8.c
src/ksp/ksp/tutorials/ex10.c
src/ksp/ksp/tutorials/ex25.c
src/ksp/ksp/tutorials/ex28.c
src/ksp/ksp/tutorials/ex29.c
src/ksp/ksp/tutorials/ex3.c
## Implementations VecAssemblyBegin_MPI in src/vec/vec/impls/mpi/pdvec.c
VecAssemblyBegin_Nest in src/vec/vec/impls/nest/vecnest.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)