PETSc version 3.17.4
Fix/Edit manual page

# ISIntersect

Computes the intersection of two index sets, by sorting and comparing.

### Synopsis

    #include "petscis.h"
    PetscErrorCode ISIntersect(IS is1,IS is2,IS *isout)

Collective on IS

### Input Parameters

| is1 | - first index set
| is2 | - second index set

### Output Parameters

| isout | - the sorted intersection of is1 and is2

### Notes

Negative values are removed from the lists. This requires O(min(is1,is2)) memory and O(max(is1,is2)log(max(is1,is2))) work

The IS's do not need to be sorted.

### See Also

ISDestroy(), ISView(), ISDifference(), ISSum(), ISExpand()

### Level

intermediate

### Location

src/vec/is/is/utils/isdiff.c
Index of all IS routines
Table of Contents for all manual pages
Index of all manual pages