#include "petscmat.h" int MatCreateSeqAIJ(MPI_Comm comm,int m,int n,int nz,int *nnz,Mat *A)Collective on MPI_Comm
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 PETSC_NULL |
Specify the preallocated storage with either nz or nnz (not both). Set nz=PETSC_DEFAULT and nnz=PETSC_NULL for PETSc to control dynamic memory allocation. For large problems you MUST preallocate memory or you will get TERRIBLE performance, see the users' manual chapter on matrices.
By default, this format uses inodes (identical nodes) when possible, to improve numerical efficiency of matrix-vector products and solves. We search for consecutive rows with the same nonzero structure, thereby reusing matrix information to achieve increased efficiency.
-mat_aij_no_inode | - Do not use inodes | |
-mat_aij_inode_limit <limit> | - Sets inode limit (max limit=5) | |
-mat_aij_oneindex | - Internally use indexing starting at 1 rather than 0. Note that when calling MatSetValues(), the user still MUST index entries starting at 0! |
Level:intermediate
Location:src/mat/impls/aij/seq/aij.c
Index of all Mat routines
Table of Contents for all manual pages
Index of all manual pages