#include "petscmat.h" PetscErrorCode MatCreateSeqAIJWithArrays(MPI_Comm comm,PetscInt m,PetscInt n,PetscInt *i,PetscInt *j,PetscScalar *a,Mat *mat)Collective on MPI_Comm Many br
comm | - must be an MPI communicator of size 1 Many br | |
m | - number of rows Many br | |
n | - number of columns Many br | |
i | - row indices Many br | |
j | - column indices Many br | |
a | - matrix values Many br |
Many br
You cannot set new nonzero locations into this matrix, that will generate an error. Many br
The i and j indices are 0 based Many br
The format which is used for the sparse matrix input, is equivalent to a Many brrow-major ordering.. i.e for the following matrix, the input data expected is Many bras shown Many br
1 0 0
2 0 3
4 5 6
i = {0,1,3,6} [size = nrow+1 = 3+1]
j = {0,0,2,0,1,2} [size = 6]; values must be sorted for each row
v = {1,2,3,4,5,6} [size = 6]
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