:orphan: # MatGetOwnershipIS Get row and column ownership of a matrices' values as index sets. 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](sec_matlayout) for details on matrix layouts. ## 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 ## See Also [](ch_matrices), `Mat`, `MatGetOwnershipRange()`, `MatGetOwnershipRangeColumn()`, `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
--- [Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/mat/interface/matrix.c) [Index of all Mat routines](index.md) [Table of Contents for all manual pages](/manualpages/index.md) [Index of all manual pages](/manualpages/singleindex.md)