MatRestoreRow

Frees any temporary space allocated by MatGetRow().

Synopsis

#include "petscmat.h" 
int MatRestoreRow(Mat mat,int row,int *ncols,int **cols,PetscScalar **vals)
Not Collective

Input Parameters

mat - the matrix
row - the row to get
ncols, cols - the number of nonzeros and their columns
vals - if nonzero the column values

Notes

This routine should be called after you have finished examining the entries.

Fortran Notes

The calling sequence from Fortran is
   MatRestoreRow(matrix,row,ncols,cols,values,ierr)
      Mat     matrix (input)
      integer row    (input)
      integer ncols  (output)
      integer cols(maxcols) (output)
      double precision (or double complex) values(maxcols) output
Where maxcols >= maximum nonzeros in any row of the matrix.

In Fortran MatRestoreRow() MUST be called after MatGetRow() before another call to MatGetRow() can be made.

See Also

MatGetRow()

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