MatGetValue#
Gets a single value from a matrix
Synopsis#
static inline PetscErrorCode MatGetValue(Mat mat, PetscInt row, PetscInt col, PetscScalar *va)
Not Collective; can only return a value owned by the given process
Input Parameters#
mat - the matrix
row - the row location of the entry
col - the column location of the entry
Output Parameter#
va - the value
Notes#
For efficiency one should use MatGetValues()
and get several values simultaneously.
See notes for MatGetValues()
.
See Also#
MatSetValue()
, MatGetValueLocal()
, MatGetValues()
Level#
advanced
Location#
Examples#
src/snes/tutorials/ex48.c.html
src/ts/tutorials/ex14.c.html
Index of all Mat routines
Table of Contents for all manual pages
Index of all manual pages