VecStepMax — PETSc 3.23.0 documentation

Skip to main content
`Ctrl`+`K`

# VecStepMax

Returns the largest value so that x[i] + step*DX[i] >= 0 for all i

## Synopsis

    #include "petscvec.h"
    PetscErrorCode VecStepMax(Vec X, Vec DX, PetscReal *step)

Collective

## Input Parameters

- X - vector with no negative entries

- DX - a step direction, can have negative, positive or zero entries

## Output Parameter

- step - largest value such that x[i] + step*DX[i] >= 0 for all i

## Note

For complex numbers only compares the real part

## See Also

`Vec`

## Level

advanced

## Location

src/vec/vec/utils/projection.c

Index of all Vec routines
Table of Contents for all manual pages
Index of all manual pages