# MatGetOwnershipRange

Returns the range of matrix rows owned by this processor, assuming that the matrix is laid out with the first n1 rows on the first processor, the next n2 rows on the second, etc. For certain parallel layouts this range may not be well defined.

### Synopsis

    #include "petscmat.h"
    PetscErrorCode PETSCMAT_DLLEXPORT MatGetOwnershipRange(Mat mat,PetscInt *m,PetscInt* n)

Not Collective

### Input Parameters

mat -the matrix

### Output Parameters

| m | - the global index of the first local row
| n | - one more than the global index of the last local row

Note: both output parameters can be PETSC_NULL on input.

Level:beginner
Location:src/mat/interface/matrix.c
Index of all Mat routines
Table of Contents for all manual pages
Index of all manual pages

### Examples

src/ksp/examples/tutorials/ex2.c.html
src/ksp/examples/tutorials/ex4.c.html
src/ksp/examples/tutorials/ex5.c.html
src/ksp/examples/tutorials/ex7.c.html
src/ksp/examples/tutorials/ex8.c.html
src/ksp/examples/tutorials/ex9.c.html
src/ksp/examples/tutorials/ex11.c.html
src/ksp/examples/tutorials/ex12.c.html
src/ksp/examples/tutorials/ex15.c.html
src/ksp/examples/tutorials/ex16.c.html
src/ksp/examples/tutorials/ex2f.F.html