#include "petscmat.h" PetscErrorCode MatGetRow(Mat mat,PetscInt row,PetscInt *ncols,const PetscInt *cols[],const PetscScalar *vals[])Not Collective Many br
mat | - the matrix Many br | |
row | - the row to get Many br |
ncols | - if not NULL, the number of nonzeros in the row Many br | |
cols | - if not NULL, the column numbers Many br | |
vals | - if not NULL, the values Many br |
MatGetRow() always returns 0-based column indices, regardless of Many brwhether the internal representation is 0-based (default) or 1-based. Many br
For better efficiency, set cols and/or vals to NULL if you do Many brnot wish to extract these quantities. Many br
The user can only examine the values extracted with MatGetRow(); Many brthe values cannot be altered. To change the matrix entries, one Many brmust use MatSetValues(). Many br
You can only have one call to MatGetRow() outstanding for a particular Many brmatrix at a time, per processor. MatGetRow() can only obtain rows Many brassociated with the given processor, it cannot get rows from the Many brother processors; for that we suggest using MatGetSubMatrices(), then Many brMatGetRow() on the submatrix. The row indix passed to MatGetRows() Many bris in the global number of rows. Many br
MatGetRow(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) outputMany brwhere maxcols >= maximum nonzeros in any row of the matrix. Many br
Many br
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