ptr -the location to put the pointer to the indices
Fortran Note
This routine has two different interfaces from Fortran; the first is not recommend, it does not require Fortran 90
IS is
integer is_array(1)
PetscOffset i_is
int ierr
call ISGetIndices(is,is_array,i_is,ierr)
Access first local entry in list
value = is_array(i_is + 1)
...... other code
call ISRestoreIndices(is,is_array,i_is,ierr)
The second Fortran interface is recommended.
use petscisdef
PetscInt, pointer :: array(:)
PetscErrorCode ierr
IS i
call ISGetIndicesF90(i,array,ierr)
See the Fortran chapter of the users manual and
petsc/src/is/[tutorials,tests] for details.
See Also
ISRestoreIndices(), ISGetIndicesF90()
Level
intermediate
Location
src/vec/is/is/interface/index.c
Examples
src/vec/vec/utils/tagger/tutorials/ex1.c.html
src/vec/is/is/tutorials/ex1.c.html
src/vec/is/is/tutorials/ex2.c.html
src/vec/is/is/tutorials/ex3.c.html
src/vec/is/is/tutorials/ex1f.F.html
src/vec/is/is/tutorials/ex2f.F.html
src/dm/tutorials/swarm_ex3.c.html
src/ksp/ksp/tutorials/ex71.c.html
src/ksp/ksp/tutorials/ex76.c.html
src/snes/tutorials/ex56.c.html
src/snes/tutorials/ex77.c.html
Implementations
ISGetIndices_Block in src/vec/is/is/impls/block/block.c
ISGetIndices_General in src/vec/is/is/impls/general/general.c
ISGetIndices_Stride in src/vec/is/is/impls/stride/stride.c
Index of all IS routines
Table of Contents for all manual pages
Index of all manual pages