# ISGetPointRange
Returns a description of the points in an `IS` suitable for traversal 
## Synopsis
```
#include "petscis.h"  
PetscErrorCode ISGetPointRange(IS pointIS, PetscInt *pStart, PetscInt *pEnd, const PetscInt **points)
```
Not collective


## Input Parameter

- ***pointIS -*** The `IS` object



## Output Parameters

- ***pStart -*** The first index, see notes
- ***pEnd   -*** One past the last index, see notes
- ***points -*** The indices, see notes





## Notes
If the `IS` contains contiguous indices in an `ISSTRIDE`, then the indices are contained in [pStart, pEnd) and points = NULL. Otherwise, pStart = 0, pEnd = numIndices, and points is an array of the indices. This supports the following pattern
```none
  ISGetPointRange(is, &pStart, &pEnd, &points);
  for (p = pStart; p < pEnd; ++p) {
    const PetscInt point = points ? points[p] : p;
  }
  ISRestorePointRange(is, &pstart, &pEnd, &points);
```



## See Also
 [](sec_scatter), `IS`, `ISRestorePointRange()`, `ISGetPointSubrange()`, `ISGetIndices()`, `ISCreateStride()`

## Level
intermediate

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/vec/is/utils/isltog.c.html#ISGetPointRange">src/vec/is/utils/isltog.c</A>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/vec/is/utils/isltog.c)


[Index of all IS routines](index.md)  
[Table of Contents for all manual pages](/docs/manualpages/index.md)  
[Index of all manual pages](/docs/manualpages/singleindex.md)  
