# ISSum

Computes the sum (union) of two index sets in place. Note that is1 is an existing IS, not merely a pointer.

### Synopsis

    #include "petscis.h"
    PetscErrorCode PETSCVEC_DLLEXPORT ISSum(IS *is1,IS is2)

Only sequential version (at the moment)

### Input Parameter

| is1 | - index set to be extended
| is2 | - index values to be added

### Notes

If n1 and n2 are the sizes of the sets, this takes O(n1+n2) time; if is2 is a subset of is1, is1 is left unchanged, otherwise is1 is reallocated. Both index sets need to be sorted on input.

### See Also

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

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