# ISGetTotalIndices
Retrieve an array containing all indices across the communicator. 
## Synopsis
```
#include "petscis.h" 
PetscErrorCode ISGetTotalIndices(IS is, const PetscInt *indices[])
```
Collective on IS


## Input Parameter

- ***is -*** the index set



## Output Parameter

- ***indices -*** total indices with rank 0 indices first, and so on; total array size is
the same as returned with ISGetSize().





## Notes
this is potentially nonscalable, but depends on the size of the total index set
and the size of the communicator. This may be feasible for index sets defined on
subcommunicators, such that the set size does not grow with PETSC_WORLD_COMM.
Note also that there is no way to tell where the local part of the indices starts
(use ISGetIndices() and ISGetNonlocalIndices() to retrieve just the local and just
the nonlocal part (complement), respectively).


## See Also
 `ISRestoreTotalIndices()`, `ISGetNonlocalIndices()`, `ISGetSize()`

## Level
intermediate

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/vec/is/is/interface/index.c.html#ISGetTotalIndices">src/vec/is/is/interface/index.c</A>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/vec/is/is/interface/index.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)  
