VecAssemblyEnd — PETSc 3.23.0 documentation

Skip to main content
`Ctrl`+`K`

# VecAssemblyEnd

Completes assembling the vector. This routine should be called after `VecAssemblyBegin()`.

## Synopsis

    #include "petscvec.h"
    PetscErrorCode VecAssemblyEnd(Vec vec)

Collective

## Input Parameter

- vec - the vector

## Options Database Keys

- -vec_view - Prints vector in `PETSC_VIEWER_DEFAULT` format

- -vec_view ::ascii_matlab - Prints vector in `PETSC_VIEWER_ASCII_MATLAB` format to stdout

- -vec_view matlab:filename - Prints vector in MATLAB .mat file to filename (requires PETSc configured with –with-matlab)

- -vec_view draw - Activates vector viewing using drawing tools

- -display - Sets display name (default is host)

- -draw_pause - Sets number of seconds to pause after display

- -vec_view socket - Activates vector viewing using a socket

## See Also

Vectors and Parallel Data, `Vec`, `VecAssemblyBegin()`, `VecSetValues()`

## Level

beginner

## Location

src/vec/vec/interface/vector.c

## Examples

src/dm/impls/stag/tutorials/ex3.c
src/dm/impls/stag/tutorials/ex6.c
src/dm/impls/stag/tutorials/ex8.c
src/ksp/ksp/tutorials/ex25.c
src/ksp/ksp/tutorials/ex3.c
src/ksp/ksp/tutorials/ex29.c
src/dm/impls/stag/tutorials/ex1.c
src/dm/impls/stag/tutorials/ex2.c
src/ksp/ksp/tutorials/ex28.c
src/dm/impls/stag/tutorials/ex4.c

## Implementations

VecAssemblyEnd_MPI() in src/vec/vec/impls/mpi/pdvec.c
VecAssemblyEnd_Nest() in src/vec/vec/impls/nest/vecnest.c

Index of all Vec routines
Table of Contents for all manual pages
Index of all manual pages