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

# VecGetArrayReadF90

Accesses a read only array from Fortran90. For default PETSc vectors, VecGetArrayF90() returns a pointer to the local data array. Otherwise, this routine is implementation dependent. You MUST call VecRestoreArrayReadF90() when you no longer need access to the array.

### Synopsis

    VecGetArrayReadF90(Vec x,{Scalar, pointer :: xx_v(:)},integer ierr)

Logically Collective on Vec Many br

### Input Parameter

x -vector Many br

### Output Parameters

| xx_v | - the Fortran90 pointer to the array Many br
| ierr | - error code Many br

### Example of Usage

        PetscScalar, pointer :: xx_v(:)
        ....
        call VecGetArrayReadF90(x,xx_v,ierr)
        a = xx_v(3)
        call VecRestoreArrayReadF90(x,xx_v,ierr)

Many br

If you intend to write entries into the array you must use VecGetArrayF90(). Many br

Many br

### See Also

VecRestoreArrayReadF90(), VecGetArray(), VecRestoreArray(), VecGetArrayRead(), VecRestoreArrayRead(), VecGetArrayF90(), UsingFortran

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