Creates a vector scatter context.
xin - a vector that defines the shape (parallel data layout of the vector) of vectors from which we scatter
yin - a vector that defines the shape (parallel data layout of the vector) of vectors to which we scatter
ix - the indices of xin to scatter (if NULL scatters all values)
iy - the indices of yin to hold results (if NULL fills entire vector yin)
newsf - location to store the new scatter context
Options Database Keys#
If both xin and yin are parallel, their communicator must be on the same
set of processes, but their process order can be different.
In calls to the scatter options you can use different vectors than the xin and
yin you used above; BUT they must have the same parallel data layout, for example,
they could be obtained from
A VecScatter context CANNOT be used in two or more simultaneous scatters;
that is you cannot call a second
VecScatterBegin() with the same scatter
context until the
VecScatterEnd() has been called on the first
In this case a separate
VecScatter is needed for each concurrent scatter.
Both ix and iy cannot be NULL at the same time.
VecScatterCreateToAll() to create a vecscatter that copies an MPI vector to sequential vectors on all MPI ranks.
VecScatterCreateToZero() to create a vecscatter that copies an MPI vector to a sequential vector on MPI rank 0.
These special vecscatters have better performance than general ones.