petsc-3.4.2 2013-07-02

# VecShift

Shifts all of the components of a vector by computing x[i] = x[i] + shift.

### Synopsis

    #include "petscvec.h"
    PetscErrorCode  VecShift(Vec v,PetscScalar shift)

Logically Collective on Vec

### Input Parameters

| v | - the vector
| shift | - the shift

### Output Parameter

v -the shifted vector

Level:intermediate
Location:src/vec/vec/utils/vinv.c
Index of all Vec routines
Table of Contents for all manual pages
Index of all manual pages

### Examples

src/snes/examples/tutorials/ex54.c.html
src/snes/examples/tutorials/ex60.c.html
src/snes/examples/tutorials/ex61.c.html
src/snes/examples/tutorials/ex63.c.html
src/snes/examples/tutorials/ex633d_db.c.html
src/snes/examples/tutorials/ex64.c.html
src/snes/examples/tutorials/ex65.c.html