petsc-3.9.0 2018-04-07
Report Typos and Errors

VecMin

Determines the minimum vector component and its location.

Synopsis

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

Input Parameters

x -the vector

Output Parameter

val - the minimum component
p - the location of val (pass NULL if you don't want this location)

Notes

Returns the value PETSC_MAX_REAL and p = -1 if the vector is of length 0.

This returns the smallest index with the minumum value

See Also

VecMax()

Level

intermediate

Location

src/vec/vec/interface/rvector.c

Examples

src/vec/vec/examples/tutorials/ex1.c.html
src/dm/examples/tutorials/ex15.c.html
src/ksp/ksp/examples/tutorials/ex10.c.html
src/ts/examples/tutorials/ex9.c.html
src/ts/examples/tutorials/ex10.c.html
src/ts/examples/tutorials/ex17.c.html

Implementations

VecMin_MPI in src/vec/vec/impls/mpi/pvec2.c
VecMin_Nest_Recursive in src/vec/vec/impls/nest/vecnest.c
VecMin_Nest in src/vec/vec/impls/nest/vecnest.c
VecMin_Node in src/vec/vec/impls/node/vecnode.c
VecMin_Seq in src/vec/vec/impls/seq/dvec2.c

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