MatCreateSeqAdj
Creates a sparse matrix representing an adjacency list. The matrix does not have numerical values associated with it, but is intended for ordering (to reduce bandwidth etc) and partitioning.
Synopsis
int MatCreateSeqAdj(MPI_Comm comm,int m,int n,int *i,int *j, Mat *A)
Collective on MPI_Comm (which can only be associated with one processor)
Input Parameters
comm -MPI communicator, set to PETSC_COMM_SELF
m -number of rows
n -number of columns
i -the indices into j for the start of each row
j -the column indices for each row (sorted for each row)
The indices in i and j start with zero NOT one.
Output Parameter
A -the matrix
Notes: This matrix type does not support most of the matrix operations, like,
MatSetValues().
You must NOT free the ii and jj arrays yourself. PETSc will free them
when the matrix is destroyed.
MatSetOption() possible values -MAT_STRUCTURALLY_SYMMETRIC
See Also
MatCreate(), MatCreateMPIADJ(), MatGetOrdering()
Level:intermediate
Location:src/mat/impls/adj/seq/adj.c
Matrix Index
Table of Contents