:orphan:
# VecDotRealPart
Computes the real part of the vector dot product. 
## Synopsis
```
#include "petscvec.h"   
PetscErrorCode VecDotRealPart(Vec x, Vec y, PetscReal *val)
```
Collective


## Input Parameters

- ***x -*** first vector
- ***y -*** second vector



## Output Parameter

- ***val -*** the real part of the dot product;





## Performance Issues
```none
    per-processor memory bandwidth
    interprocessor latency
    work load imbalance that causes certain processes to arrive much earlier than others
```



## Notes for Users of Complex Numbers
See `VecDot()` for more details on the definition of the dot product for complex numbers

For real numbers this returns the same value as `VecDot()`

For complex numbers in C^n (that is a vector of n components with a complex number for each component) this is equal to the usual real dot product on the
the space R^{2n} (that is a vector of 2n components with the real or imaginary part of the complex numbers for components)


## Developer Note
This is not currently optimized to compute only the real part of the dot product.


## See Also
 [](ch_vectors), `Vec`, `VecMDot()`, `VecTDot()`, `VecNorm()`, `VecDotBegin()`, `VecDotEnd()`, `VecDot()`, `VecDotNorm2()`

## Level
intermediate

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/vec/vec/interface/rvector.c.html#VecDotRealPart">src/vec/vec/interface/rvector.c</A>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/vec/vec/interface/rvector.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)  
