petsc-3.7.1 2016-05-15
Report Typos and Errors

VecStrideSubSetScatter

Scatters components from a vector into a subset of components of a multi-component vector.

Synopsis

#include "petscvec.h" 
PetscErrorCode  VecStrideSubSetScatter(Vec s,PetscInt nidx,const PetscInt idxs[],const PetscInt idxv[],Vec v,InsertMode addv)
Collective on Vec Many br

Input Parameter

s - the smaller-component vector Many br
nidx - the number of indices in idx Many br
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 Many br
idxv - the indices of the components in the larger-component vector, 0 <= idx[0] ...idx[nidx-1] < bs(v) they need not be sorted Many br
addv - one of ADD_VALUES,INSERT_VALUES,MAX_VALUES Many br

Output Parameter

v -the location where the subvector is into scattered (the multi-component vector) Many br

Notes

One must call VecSetBlockSize() on the vectors before this Many brroutine to set the stride information, or use a vector created from a multicomponent DMDA. Many br

The parallel layout of the vector and the subvector must be the same; Many br

Not optimized; could be easily Many br

Many br

See Also

VecStrideNorm(), VecStrideGather(), VecStrideGather(), VecStrideSubSetGather(), VecStrideMin(), VecStrideMax(), VecStrideGatherAll(),
VecStrideScatterAll() Many br

Level:advanced
Location:
src/vec/vec/utils/vinv.c
Index of all Vec routines
Table of Contents for all manual pages
Index of all manual pages