int MatCreateMPIRowbs(MPI_Comm comm,int m,int M,int nz,int *nnz,Mat *newA)Collective on MPI_Comm
comm | - MPI communicator | |
m | - number of local rows (or PETSC_DECIDE to have calculated) | |
M | - number of global rows (or PETSC_DECIDE to have calculated) | |
nz | - number of nonzeros per row (same for all local rows) | |
nnz | - number of nonzeros per row (possibly different for each row). |
The user MUST specify either the local or global matrix dimensions (possibly both).
Specify the preallocated storage with either nz or nnz (not both). Set nz=PETSC_DEFAULT and nnz=PETSC_NULL for PETSc to control dynamic memory allocation.
MatSetOption(mat,MAT_SYMMETRIC)BEFORE calling the routine MatAssemblyBegin().
Internally, the MATMPIROWBS format inserts zero elements to the matrix if necessary, so that nonsymmetric matrices are considered to be symmetric in terms of their sparsity structure; this format is required for use of the parallel communication routines within BlockSolve95. In particular, if the matrix element A[i,j] exists, then PETSc will internally allocate a 0 value for the element A[j,i] during MatAssemblyEnd() if the user has not already set a value for the matrix element A[j,i].
Level:intermediate
Location:src/mat/impls/rowbs/mpi/mpirowbs.c
Index of all Mat routines
Table of Contents for all manual pages
Index of all manual pages