VecGetArrayF90
Accesses a vector 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 VecRestoreArrayF90() when you no longer need access to the array.
Synopsis
VecGetArrayF90(Vec x,{Scalar, pointer :: xx_v(:)},integer ierr)
Not
Collective
Input Parameter
x -vector
Output Parameters
xx_v | - the Fortran90 pointer to the array
|
ierr | - error code
|
Example of Usage
Scalar, pointer :: xx_v(:)
....
call VecGetArrayF90(x,xx_v,ierr)
a = xx_v(3)
call VecRestoreArrayF90(x,xx_v,ierr)
Notes
Not yet supported for all F90
compilers
See Also
VecRestoreArrayF90(), VecGetArray(), VecRestoreArray()
Keywords
vector, array, f90
Examples
src/vec/examples/tutorials/ex4f90.F
src/snes/examples/tutorials/ex5f90.F
Location: src/vec/interface/vector.c
Vector Index
Table of Contents