VecSum#
Computes the sum of all the components of a vector.
Synopsis#
#include "petscvec.h"
PetscErrorCode VecSum(Vec v, PetscScalar *sum)
Collective
Input Parameter#
v - the vector
Output Parameter#
sum - the result
See Also#
Level#
beginner
Location#
Examples#
src/vec/vec/tutorials/ex13.c
src/ts/tutorials/extchem.c
src/tao/unconstrained/tutorials/spectraladjointassimilation.c
src/ts/tutorials/ex9.c
src/dm/tutorials/ex2.c
src/tao/pde_constrained/tutorials/elliptic.c
src/tao/pde_constrained/tutorials/hyperbolic.c
src/ksp/ksp/tutorials/ex59.c
src/vec/vec/tutorials/ex18.c
src/vec/vec/tutorials/ex18f.F90
Implementations#
VecSum_SeqKokkos() in src/vec/vec/impls/seq/kokkos/veckok.kokkos.cxx
Index of all Vec routines
Table of Contents for all manual pages
Index of all manual pages