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

# VecGetLocalVectorRead

Maps the local portion of a vector into a vector. You must call VecRestoreLocalVectorRead() when the local vector is no longer needed.

### Synopsis

    #include "petscvec.h"
    #undef __FUNCT__
    #define __FUNCT__ "VecGetLocalVectorRead"
    PetscErrorCode VecGetLocalVectorRead(Vec v,Vec w)

Not collective. Many br

### Input parameter

v -The vector for which the local vector is desired. Many br

### Output parameter

w -Upon exit this contains the local vector. Many br

Many br

### Notes

This function is similar to VecGetArrayRead() which maps the local Many brportion into a raw pointer. VecGetLocalVectorRead() is usually Many bralmost as efficient as VecGetArrayRead() but in certain circumstances Many brVecGetLocalVectorRead() can be much more efficient than Many brVecGetArrayRead(). This is because the construction of a contiguous Many brarray representing the vector data required by VecGetArrayRead() can Many brbe an expensive operation for certain vector types. For example, for Many brGPU vectors VecGetArrayRead() requires that the data between device Many brand host is synchronized. Many br

Unlike VecGetLocalVector(), this routine is not collective and Many brpreserves cached information. Many br

### See Also

VecRestoreLocalVectorRead(), VecGetLocalVector(), VecGetArrayRead(), VecGetArray()

Level:beginner
Location:src/vec/vec/interface/rvector.c
Index of all Vec routines
Table of Contents for all manual pages
Index of all manual pages