VecMax#

Determines the vector component with maximum real part and its location.

Synopsis#

#include "petscvec.h"
PetscErrorCode VecMax(Vec x, PetscInt *p, PetscReal *val)


Collective

Input Parameter#

• x - the vector

Output Parameters#

• p - the location of val (pass NULL if you don’t want this)

• val - the maximum component

Notes#

Returns the value PETSC_MIN_REAL and negative p if the vector is of length 0.

Returns the smallest index with the maximum value

Vectors and Parallel Data, Vec, VecNorm(), VecMin()

intermediate

Location#

src/vec/vec/interface/rvector.c

Edit on GitLab