MATAIJ#
MATAIJ = “aij” - A matrix type to be used for sparse matrices. This matrix type is identical to MATSEQAIJ when constructed with a single process communicator,
and MATMPIAIJ otherwise. As a result, for single process communicators,
MatSeqAIJSetPreallocation() is supported, and similarly MatMPIAIJSetPreallocation() is supported
for communicators controlling multiple processes. It is recommended that you call both of
the above preallocation routines for simplicity.
Options Database Key#
-mat_type aij - sets the matrix type to “aij” during a call to
MatSetFromOptions()
Notes#
Call MatSetOption(A, MAT_STRUCTURE_ONLY, PETSC_TRUE) before preallocation or MatSetUp() to store only the nonzero pattern.
The assembled matrix has no numerical value array. Row and column indices supplied during insertion are retained, while numerical values are ignored.
Such matrices can be used for structural operations, but not for numerical operations.
Subclasses include MATAIJCUSPARSE, MATAIJPERM, MATAIJSELL, MATAIJMKL, MATAIJCRL, and also automatically switches over to use inodes when
enough exist.
See Also#
Matrices, Mat, MatCreateAIJ(), MatCreateSeqAIJ(), MATSEQAIJ, MATMPIAIJ, MATSELL, MATSEQSELL, MATMPISELL
Level#
beginner
Location#
Examples#
src/mat/tutorials/ex8.c
src/mat/tests/ex307.c
src/mat/tests/ex72.c
src/mat/tests/bench_spmv.c
src/mat/tests/ex103.c
src/mat/tests/ex109.c
src/mat/tests/ex111.c
src/mat/tests/ex115.c
src/mat/tests/ex122.c
src/mat/tests/ex123.c
Index of all Mat routines
Table of Contents for all manual pages
Index of all manual pages