petsc-3.7.1 2016-05-15
Report Typos and Errors

# VecCopy

Copies a vector. y <- x

### Synopsis

    #include "petscvec.h"
    PetscErrorCode  VecCopy(Vec x,Vec y)

Logically Collective on Vec Many br

### Input Parameter

x -the vector Many br

### Output Parameter

y -the copy Many br

### Notes

For default parallel PETSc vectors, both x and y must be distributed in Many brthe same manner; local copies are done. Many br

Many br

### See Also

VecDuplicate()

Level:beginner
Location:src/vec/vec/interface/vector.c
Index of all Vec routines
Table of Contents for all manual pages
Index of all manual pages

### Examples

src/vec/vec/examples/tutorials/ex1.c.html
src/vec/vec/examples/tutorials/ex19.c.html
src/vec/vec/examples/tutorials/ex1f.F.html
src/vec/vec/examples/tutorials/ex1f90.F.html
src/vec/vec/examples/tutorials/ex4f.F.html
src/vec/vec/examples/tutorials/ex4f90.F.html
src/vec/vec/examples/tutorials/ex20f90.F90.html
src/dm/examples/tutorials/ex15.c.html
src/ksp/ksp/examples/tutorials/ex9.c.html
src/ksp/ksp/examples/tutorials/ex28.c.html
src/ksp/ksp/examples/tutorials/ex14f.F.html