Maps the local portion of a vector into a vector. You must call VecRestoreLocalVectorRead() when the local vector is no longer needed.
PetscErrorCode VecGetLocalVectorRead(Vec v,Vec w)
|v ||- The vector for which the local vector is desired.
|w ||- Upon exit this contains the local vector.
This function is similar to VecGetArrayRead() which maps the local
portion into a raw pointer. VecGetLocalVectorRead() is usually
almost as efficient as VecGetArrayRead() but in certain circumstances
VecGetLocalVectorRead() can be much more efficient than
VecGetArrayRead(). This is because the construction of a contiguous
array representing the vector data required by VecGetArrayRead() can
be an expensive operation for certain vector types. For example, for
GPU vectors VecGetArrayRead() requires that the data between device
and host is synchronized.
Unlike VecGetLocalVector(), this routine is not collective and
preserves cached information.
VecRestoreLocalVectorRead(), VecGetLocalVector(), VecGetArrayRead(), VecGetArray()
Index of all Vec routines
Table of Contents for all manual pages
Index of all manual pages