petsc-3.10.2 2018-10-09
Report Typos and Errors

MatCreateSeqAIJSELL

Creates a sparse matrix of type SEQAIJSELL. This type inherits from AIJ and is largely identical, but keeps a "shadow" copy of the matrix in SEQSELL format, which is used when this format may be more suitable for a requested operation. Currently, SEQSELL format is used for MatMult, MatMultTranspose, MatMultAdd, MatMultTransposeAdd, and MatSOR operations. Because SEQAIJSELL is a subtype of SEQAIJ, the option "-mat_seqaij_type seqaijsell" can be used to make sequential AIJ matrices default to being instances of MATSEQAIJSELL.

Synopsis

PetscErrorCode  MatCreateSeqAIJSELL(MPI_Comm comm,PetscInt m,PetscInt n,PetscInt nz,const PetscInt nnz[],Mat *A)
Collective on MPI_Comm

Input Parameters

comm - MPI communicator, set to PETSC_COMM_SELF
m - number of rows
n - number of columns
nz - number of nonzeros per row (same for all rows)
nnz - array containing the number of nonzeros in the various rows (possibly different for each row) or NULL

Output Parameter

A -the matrix

Options Database Keys

-mat_aijsell_eager_shadow -Construct shadow matrix upon matrix assembly; default is to take a "lazy" approach, performing this step the first time the matrix is applied

Notes

If nnz is given then nz is ignored

Keywords

matrix, sparse

See Also

MatCreate(), MatCreateMPIAIJSELL(), MatSetValues()

Level

intermediate

Location

src/mat/impls/aij/seq/aijsell/aijsell.c
Index of all Mat routines
Table of Contents for all manual pages
Index of all manual pages