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

VecGetArrayRead

Get read-only pointer to contiguous array containing this processor's portion of the vector data.

Synopsis

#include "petscvec.h"   
PetscErrorCode VecGetArrayRead(Vec x,const PetscScalar **a)
Not Collective Many br

Input Parameters

x -the vector Many br

Output Parameter

a -the array Many br

Many br

Notes

The array must be returned using a matching call to VecRestoreArrayRead(). Many br

Unlike VecGetArray(), this routine is not collective and preserves cached information like vector norms. Many br

Standard PETSc vectors use contiguous storage so that this routine does not perform a copy. Other vector Many brimplementations may require a copy, but must such implementations should cache the contiguous representation so that Many bronly one copy is performed when this routine is called multiple times in sequence. Many br

See Also

VecGetArray(), VecRestoreArray()

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

Examples

src/vec/is/sf/examples/tutorials/ex2.c.html
src/snes/examples/tutorials/ex1.c.html
src/snes/examples/tutorials/ex2.c.html
src/snes/examples/tutorials/ex5s.c.html
src/snes/examples/tutorials/ex42.c.html
src/snes/examples/tutorials/ex48.c.html
src/snes/examples/tutorials/ex59.c.html
src/snes/examples/tutorials/ex70.c.html
src/snes/examples/tutorials/ex1f.F.html
src/ts/examples/tutorials/ex1.c.html
src/ts/examples/tutorials/ex2.c.html