#include "petscmat.h" PetscErrorCode MatCreateSeqSBAIJWithArrays(MPI_Comm comm,PetscInt bs,PetscInt m,PetscInt n,PetscInt i[],PetscInt j[],PetscScalar a[],Mat *mat)Collective on MPI_Comm
comm | - must be an MPI communicator of size 1 | |
bs | - size of block | |
m | - number of rows | |
n | - number of columns | |
i | - row indices | |
j | - column indices | |
a | - matrix values |
You cannot set new nonzero locations into this matrix, that will generate an error.
The i and j indices are 0 based
When block size is greater than 1 the matrix values must be stored using the SBAIJ storage format (see the SBAIJ code to determine this). For block size of 1 it is the regular CSR format excluding the lower triangular elements.