MatCreateMPIRowbs

Creates a sparse parallel matrix in the MATMPIROWBS format. This format is intended primarily as an interface for BlockSolve95.

Synopsis

int MatCreateMPIRowbs(MPI_Comm comm,int m,int M,int nz,int *nnz,void *procinfo,Mat *newA)
Collective on MPI_Comm

Input Parameters

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)

Output Parameter

newA -the matrix

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.

Notes

By default, the matrix is assumed to be nonsymmetric; the user cantake advantage of special optimizations for symmetric matrices by calling
    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].

Fortran Note

Fortran users should always use PETSC_NULL for procinfo.

Options Database Keys

-mat_rowbs_no_inode -Do not use inodes.

Keywords

matrix, row, symmetric, sparse, parallel, BlockSolve

See Also

MatCreate(), MatSetValues()

Location: src/mat/impls/rowbs/mpi/mpirowbs.c
Matrix Index
Table of Contents