#include "petscvec.h" PetscErrorCode VecMin(Vec x,PetscInt *p,PetscReal *val)
This returns the smallest index with the minumum value