petsc-3.13.6 2020-09-29
Report Typos and Errors

MatGetSize

Returns the numbers of rows and columns in a matrix.

Synopsis

#include "petscmat.h" 
PetscErrorCode MatGetSize(Mat mat,PetscInt *m,PetscInt *n)
Not Collective

Input Parameter

mat -the matrix

Output Parameters

m - the number of global rows
n - the number of global columns

Note: both output parameters can be NULL on input.

See Also

MatGetLocalSize()

Level

beginner

Location

src/mat/interface/matrix.c

Examples

src/mat/tutorials/ex4.c.html
src/mat/tutorials/ex10.c.html
src/mat/tutorials/ex12.c.html
src/mat/tutorials/ex16.c.html
src/mat/tutorials/ex17.c.html
src/mat/tutorials/ex4f.F90.html
src/mat/tutorials/ex17f.F90.html
src/ksp/ksp/tutorials/ex4.c.html
src/ksp/ksp/tutorials/ex59.c.html
src/ksp/ksp/tutorials/ex72.c.html
src/ksp/ksp/tutorials/ex73.c.html

Index of all Mat routines
Table of Contents for all manual pages
Index of all manual pages