#include "petscvec.h" PetscErrorCode VecGetValues(Vec x,PetscInt ni,const PetscInt ix,PetscScalar y)Not Collective
|x||- vector to get values from|
|ni||- number of elements to get|
|ix||- indices where to get them from (in global 1d numbering)|
|y||- array of values|
VecGetValues() gets y[i] = x[ix[i]], for i=0,...,ni-1.
VecAssemblyBegin() and VecAssemblyEnd() MUST be called before calling this
VecGetValues() uses 0-based indices in Fortran as well as in C.
If you call VecSetOption(x, VEC_IGNORE_NEGATIVE_INDICES,PETSC_TRUE), negative indices may be passed in ix. These rows are simply ignored.