int MatCreateMPIRowbs(MPI_Comm comm,int m,int M,int nz,int *nnz,void *procinfo,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) |
nzz | - number of nonzeros per row (possibly different for each row). |
procinfo | - optional BlockSolve95 BSprocinfo context (use PETSC_NULL for PETSc to create and initialize this context) |
The user MUST specify either the local or global matrix dimensions(possibly both).
Specify the preallocated storage with either nz or nnz (not both). Setnz=PETSC_DEFAULT and nnz=PETSC_NULL for PETSc to control dynamic memoryallocation.
MatSetOption(mat,MAT_SYMMETRIC)BEFORE calling the routine MatAssemblyBegin().
Internally, the MATMPIROWBS format inserts zero elements to thematrix if necessary, so that nonsymmetric matrices are consideredto be symmetric in terms of their sparsity structure; this formatis required for use of the parallel communication routines withinBlockSolve95. In particular, if the matrix element A[i,j] exists, then PETSc will internally allocate a 0 value for the elementA[j,i] during MatAssemblyEnd() if the user has not already seta value for the matrix element A[j,i].
Location: src/mat/impls/rowbs/mpi/mpirowbs.c
Matrix Index
Table of Contents