Skip to main content
`Ctrl`+`K`

# DMCompositeGetLocalISs

Gets index sets for each component of a composite local vector

## Synopsis

    #include "petscdmcomposite.h"
    PetscErrorCode DMCompositeGetLocalISs(DM dm, IS **is)

Not Collective; No Fortran Support

## Input Parameter

- dm - the `DMCOMPOSITE`

## Output Parameter

- is - array of serial index sets for each component of the `DMCOMPOSITE`

## Notes

At present, a composite local vector does not normally exist. This function is used to provide index sets for `MatGetLocalSubMatrix()`. In the future, the scatters for each entry in the `DMCOMPOSITE` may be merged into a single scatter to a composite local vector. The user should not typically need to know which is being done.

To get the composite global indices at all local points (including ghosts), use `DMCompositeGetISLocalToGlobalMappings()`.

To get index sets for pieces of the composite global vector, use `DMCompositeGetGlobalISs()`.

Each returned `IS` should be destroyed with `ISDestroy()`, the array should be freed with `PetscFree()`.

## Fortran Note

Pass in an array long enough to hold all the `IS`, see `DMCompositeGetNumberDM()`

## See Also

`DMCOMPOSITE`, `DM`, `DMCompositeGetGlobalISs()`, `DMCompositeGetISLocalToGlobalMappings()`, `MatGetLocalSubMatrix()`, `MatCreateLocalRef()`, `DMCompositeGetNumberDM()`

## Level

intermediate

## Location

src/dm/impls/composite/pack.c

## Examples

src/ts/tutorials/ex14.c
src/snes/tutorials/ex28.c

Index of all DM routines
Table of Contents for all manual pages
Index of all manual pages