# VecStepMaxBounded
See below 
## Synopsis
```
#include "petscvec.h"  
PetscErrorCode VecStepMaxBounded(Vec X, Vec DX, Vec XL, Vec XU, PetscReal *stepmax)
```
Collective on Vec


## Input Parameters

- ***X  -*** vector with no negative entries
- ***XL -*** lower bounds
- ***XU -*** upper bounds
- ***DX  -*** step direction, can have negative, positive or zero entries



## Output Parameter

- ***stepmax -*** minimum value so that X[i] + stepmax*DX[i] <= XL[i]  or  XU[i] <= X[i] + stepmax*DX[i]





## Level
intermediate

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/vec/vec/utils/projection.c.html#VecStepMaxBounded">src/vec/vec/utils/projection.c</A>


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