#include "petscmat.h" PetscErrorCode PETSCMAT_DLLEXPORT MatSetSizes(Mat A, PetscInt m, PetscInt n, PetscInt M, PetscInt N)Collective on Mat
A | - the matrix | |
m | - number of local rows (or PETSC_DECIDE) | |
n | - number of local columns (or PETSC_DECIDE) | |
M | - number of global rows (or PETSC_DETERMINE) | |
N | - number of global columns (or PETSC_DETERMINE) |
If PETSC_DECIDE is not used for the arguments 'm' and 'n', then the user must ensure that they are chosen to be compatible with the vectors. To do this, one first considers the matrix-vector product 'y = A x'. The 'm' that is used in the above routine must match the local size used in the vector creation routine VecCreateMPI() for 'y'. Likewise, the 'n' used must match that used as the local size in VecCreateMPI() for 'x'.
Level:beginner
Location:src/mat/utils/gcreate.c
Index of all Mat routines
Table of Contents for all manual pages
Index of all manual pages