Skip to main content
`Ctrl`+`K`

# MatGetOwnershipIS

Get row and column ownership of a matrices’ values as index sets.

## Synopsis

    #include "petscmat.h"
    PetscErrorCode MatGetOwnershipIS(Mat A, IS *rows, IS *cols)

Not Collective

## Input Parameter

- A - matrix

## Output Parameters

- rows - rows in which this process owns elements, , use `NULL` to not obtain this value

- cols - columns in which this process owns elements, use `NULL` to not obtain this value

## Note

You should call `ISDestroy()` on the returned `IS`

For most matrices, excluding `MATELEMENTAL` and `MATSCALAPACK`, this corresponds to values returned by `MatGetOwnershipRange()`, `MatGetOwnershipRangeColumn()`. For `MATELEMENTAL` and `MATSCALAPACK` the ownership is more complicated. See Matrix Layouts for details on matrix layouts.

## See Also

Matrices, `IS`, `Mat`, `MatGetOwnershipRanges()`, `MatSetValues()`, `MATELEMENTAL`, `MATSCALAPACK`

## Level

intermediate

## Location

src/mat/interface/matrix.c

## Examples

src/ksp/ksp/tutorials/ex76.c

## Implementations

MatGetOwnershipIS_Elemental() in src/mat/impls/elemental/matelem.cxx
MatGetOwnershipIS_ScaLAPACK() in src/mat/impls/scalapack/matscalapack.c

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