petsc-3.7.1 2016-05-15
Report Typos and Errors

# MatGetRowIJ

Returns the compressed row storage i and j indices for sequential matrices.

### Synopsis

    #include "petscmat.h"
    PetscErrorCode MatGetRowIJ(Mat mat,PetscInt shift,PetscBool symmetric,PetscBool inodecompressed,PetscInt *n,const PetscInt *ia[],const PetscInt *ja[],PetscBool  *done)

Collective on Mat Many br

### Input Parameters

| mat | - the matrix Many br
| shift | - 0 or 1 indicating we want the indices starting at 0 or 1 Many br
| symmetric | - PETSC_TRUE or PETSC_FALSE indicating the matrix data structure should be symmetrized Many br
| inodecompressed | - PETSC_TRUE or PETSC_FALSE indicating if the nonzero structure of the Many brinodes or the nonzero elements is wanted. For BAIJ matrices the compressed version is Many bralways used. Many br

### Output Parameters

| n | - number of rows in the (possibly compressed) matrix Many br
| ia | - the row pointers [of length n+1] Many br
| ja | - the column indices Many br
| done | - indicates if the routine actually worked and returned appropriate ia[] and ja[] arrays; callers Many brare responsible for handling the case when done == PETSC_FALSE and ia and ja are not set Many br

Many br

Notes: You CANNOT change any of the ia[] or ja[] values. Many br

Use MatRestoreRowIJ() when you are finished accessing the ia[] and ja[] values Many br

Fortran Node Many br

In Fortran use Many br

              PetscInt ia(1), ja(1)

              PetscOffset iia, jja

         call MatGetRowIJ(mat,shift,symmetric,inodecompressed,n,ia,iia,ja,jja,done,ierr)

         Acess the ith and jth entries via ia(iia + i) and ja(jja + j)

             or

              PetscInt, pointer :: ia(:),ja(:)

       call  MatGetRowIJF90(mat,shift,symmetric,inodecompressed,n,ia,ja,done,ierr)

         Acess the ith and jth entries via ia(i) and ja(j)

### See Also

MatGetColumnIJ(), MatRestoreRowIJ(), MatSeqAIJGetArray()

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