petsc-3.12.4 2020-02-04
Report Typos and Errors

# VecGetArrayWrite

Returns a pointer to a contiguous array that WILL contains this processor's portion of the vector data. The values in this array are NOT valid, the routine calling this routine is responsible for putting values into the array; any values it does not set will be invalid

### Synopsis

    #include "petscvec.h"
    PetscErrorCode VecGetArrayWrite(Vec x,PetscScalar **a)

Logically Collective on Vec

### Input Parameter

x -the vector

### Output Parameter

a -location to put pointer to the array

This is for vectors associate with GPUs, the vector is not copied up before giving access. If you need correct values in the array use VecGetArray()

Concepts: vector^accessing local values

### See Also

VecRestoreArray(), VecGetArrayRead(), VecGetArrays(), VecGetArrayF90(), VecGetArrayReadF90(), VecPlaceArray(), VecGetArray2d(),
VecGetArrayPair(), VecRestoreArrayPair(), VecGetArray(), VecRestoreArrayWrite()

### Level

intermediate

### Location

src/vec/vec/interface/rvector.c

### Implementations

VecGetArrayWrite_SeqCUDA in src/vec/vec/impls/seq/seqcuda/veccuda.c
Index of all Vec routines
Table of Contents for all manual pages
Index of all manual pages