#include "petscvec.h" PetscErrorCode VecStrideSubSetScatter(Vec s,PetscInt nidx,const PetscInt idxs[],const PetscInt idxv[],Vec v,InsertMode addv)Collective on Vec
s | - the smaller-component vector | |
nidx | - the number of indices in idx | |
idxs | - the indices of the components in the smaller-component vector, 0 <= idxs[0] ...idxs[nidx-1] < bs(s) they need not be sorted, may be null if nidx == bs(s) or is PETSC_DETERMINE | |
idxv | - the indices of the components in the larger-component vector, 0 <= idx[0] ...idx[nidx-1] < bs(v) they need not be sorted | |
addv | - one of ADD_VALUES,INSERT_VALUES,MAX_VALUES |
The parallel layout of the vector and the subvector must be the same;
Not optimized; could be easily