# VecPointwiseMin
Computes the component-wise minimum `w[i] = min(x[i], y[i])`. 
## Synopsis
```
#include "petscvec.h"   
PetscErrorCode VecPointwiseMin(Vec w, Vec x, Vec y)
```
Logically Collective


## Input Parameters

- ***x -*** the first input vector
- ***y -*** the second input vector



## Output Parameter

- ***w -*** the result





## Notes
Any subset of the `x`, `y`, and `w` may be the same vector.

For complex numbers compares only the real part


## See Also
 [](chapter_vectors), `Vec`, `VecPointwiseDivide()`, `VecPointwiseMult()`, `VecPointwiseMin()`, `VecPointwiseMaxAbs()`, `VecMaxPointwiseDivide()`

## Level
advanced

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

## Implementations

<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/vec/vec/impls/seq/bvec2.c.html#VecPointwiseMin_Seq">VecPointwiseMin_Seq in src/vec/vec/impls/seq/bvec2.c</A><BR>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/vec/vec/interface/vector.c)


[Index of all Vec routines](index.md)  
[Table of Contents for all manual pages](/docs/manualpages/index.md)  
[Index of all manual pages](/docs/manualpages/singleindex.md)  
