VecSetValuesCOO#
set values at once in a vector preallocated using VecSetPreallocationCOO()
Synopsis#
#include "petscvec.h"
PetscErrorCode VecSetValuesCOO(Vec x, const PetscScalar coo_v[], InsertMode imode)
Collective
Input Parameters#
x - vector being set
coo_v - the value array
imode - the insert mode
Note#
The values must follow the order of the indices prescribed with VecSetPreallocationCOO()
or VecSetPreallocationCOOLocal()
.
When repeated entries are specified in the COO indices the coo_v values are first properly summed, regardless of the value of imode.
The imode flag indicates if coo_v must be added to the current values of the vector (ADD_VALUES
) or overwritten (INSERT_VALUES
).
VecAssemblyBegin()
and VecAssemblyEnd()
do not need to be called after this routine. It automatically handles the assembly process.
See Also#
Vectors and Parallel Data, Vec
, VecSetPreallocationCOO(), VecSetPreallocationCOOLocal(), VecSetValues()
Level#
beginner
Location#
Implementations#
VecSetValuesCOO_MPIKokkos in src/vec/vec/impls/mpi/kokkos/mpikok.kokkos.cxx
VecSetValuesCOO_MPICUDA in src/vec/vec/impls/mpi/mpicuda/mpicuda.cu
VecSetValuesCOO_MPI in src/vec/vec/impls/mpi/pdvec.c
VecSetValuesCOO_Seq in src/vec/vec/impls/seq/bvec2.c
VecSetValuesCOO_SeqKokkos in src/vec/vec/impls/seq/kokkos/veckok.kokkos.cxx
VecSetValuesCOO_SeqCUDA in src/vec/vec/impls/seq/seqcuda/veccuda2.cu
Index of all Vec routines
Table of Contents for all manual pages
Index of all manual pages