[petsc-users] zeros in sparse aij
Xiangdong Liang
xdliang at gmail.com
Thu Dec 1 18:44:21 CST 2011
Hello everyone,
I have a question about whether zeros will change the sparse pattern.
Suppose I am generating two sparse matrices A and B. A is generated
with exactly number of nonzeros, say 10 nnz per row. When I generate
matrix B, I specify 12 nonzeros, but two of them are given zero values
by MatSetValue. Will A and B have same sparsity patterns and
performance ? In other words, will PETSc simply ignore these zeros
entries? I output these A and B in matlab, and it seems that these
zeros entries are ignored. I just want to double check on this.
Is the option MAT_IGNORE_ZERO_ENTRIES on by default? Thanks.
Best,
Xiangdong
More information about the petsc-users
mailing list