:orphan: # VecMean Computes the arithmetic mean of all the components of a vector. ## Synopsis ``` #include "petscvec.h" PetscErrorCode VecMean(Vec v, PetscScalar *mean) ``` Collective ## Input Parameter - ***v -*** the vector ## Output Parameter - ***mean -*** the result ## See Also `Vec`, `VecSum()`, `VecNorm()` ## Level beginner ## Location src/vec/vec/utils/vinv.c --- [Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/vec/vec/utils/vinv.c) [Index of all Vec routines](index.md) [Table of Contents for all manual pages](/manualpages/index.md) [Index of all manual pages](/manualpages/singleindex.md)