VecStrideGather

Gathers a single component from a multi-component vector into another vector.

Synopsis

int VecStrideGather(Vec v,int start,Vec s,InsertMode addv)
Collective on Vec

Input Parameter

v - the vector
start - starting point of the subvector (defined by a stride)
addv - one of ADD_VALUES,SET_VALUES,MAX_VALUES

Output Parameter

s -the location where the subvector is stored

Notes

One must call VecSetBlockSize() before this routine to set the stride information.

If x is the array representing the vector x then this gathers the array (x[start],x[start+stride],x[start+2*stride], ....)

The parallel layout of the vector and the subvector must be the same; i.e., nlocal of v = stride*(nlocal of s)

Keywords

vector, subvector

See Also

VecStrideNorm(), VecStrideScatter(), VecStrideMin(), VecStrideMax()

Level:advanced
Location:src/vec/utils/vinv.c
Vector Index
Table of Contents