:orphan:
# ISBlockSetIndices
Set integers representing blocks of indices in an index set of `ISType` `ISBLOCK`
## Synopsis
```
#include "petscis.h"
PetscErrorCode ISBlockSetIndices(IS is, PetscInt bs, PetscInt n, const PetscInt idx[], PetscCopyMode mode)
```
Collective
## Input Parameters
- ***is -*** the index set
- ***bs -*** number of elements in each block
- ***n -*** the length of the index set (the number of blocks)
- ***idx -*** the list of integers, one for each block, the integers contain the index of the first index of each block divided by the block size
- ***mode -*** see `PetscCopyMode`, only `PETSC_COPY_VALUES` and `PETSC_OWN_POINTER` are supported
## Notes
When the communicator is not `MPI_COMM_SELF`, the operations on the
index sets, IS, are NOT conceptually the same as `MPI_Group` operations.
The index sets are then distributed sets of indices and thus certain operations
on them are collective.
The convenience routine `ISCreateBlock()` allows one to create the `IS` and provide the blocks in a single function call.
## Example
If you wish to index the values {0,1,4,5}, then use
a block size of 2 and idx of {0,2}.
## See Also
[](sec_scatter), `IS`, `ISCreateStride()`, `ISCreateGeneral()`, `ISAllGather()`, `ISCreateBlock()`, `ISBLOCK`, `ISGeneralSetIndices()`
## Level
beginner
## Location
src/vec/is/is/impls/block/block.c
## Implementations
ISBlockSetIndices_Block in src/vec/is/is/impls/block/block.c
---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/vec/is/is/impls/block/block.c)
[Index of all IS routines](index.md)
[Table of Contents for all manual pages](/manualpages/index.md)
[Index of all manual pages](/manualpages/singleindex.md)