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

# VecDot

Computes the vector dot product.

### Synopsis

    #include "petscvec.h"
    PetscErrorCode  VecDot(Vec x,Vec y,PetscScalar *val)

Collective on Vec Many br

### Input Parameters

x, y -the vectors Many br

### Output Parameter

val -the dot product Many br

### Performance Issues

       per-processor memory bandwidth

       interprocessor latency

       work load inbalance that causes certain processes to arrive much earlier than others

### Notes for Users of Complex Numbers

For complex vectors, VecDot() computes Many br

        val = (x,y) = y^H x,

where y^H denotes the conjugate transpose of y. Note that this corresponds to the usual "mathematicians" complex Many brinner product where the SECOND argument gets the complex conjugate. Since the BLASdot() complex conjugates the first Many brfirst argument we call the BLASdot() with the arguments reversed. Many br

Use VecTDot() for the indefinite form Many br

        val = (x,y) = y^T x,

where y^T denotes the transpose of y. Many br

Many br

### See Also

VecMDot(), VecTDot(), VecNorm(), VecDotBegin(), VecDotEnd(), VecDotRealPart()

Level:intermediate
Location:src/vec/vec/interface/rvector.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/ex18.c.html
src/vec/vec/examples/tutorials/ex1f.F.html
src/vec/vec/examples/tutorials/ex1f90.F.html
src/vec/vec/examples/tutorials/ex20f90.F90.html
src/ksp/ksp/examples/tutorials/ex49.c.html
src/snes/examples/tutorials/ex15.c.html
src/tao/constrained/examples/tutorials/maros.c.html
src/tao/bound/examples/tutorials/jbearing2.c.html
src/tao/pde_constrained/examples/tutorials/elliptic.c.html
src/tao/pde_constrained/examples/tutorials/parabolic.c.html