[petsc-users] MatCreateMPIAIJWithSplitArrays for symmetric matrix?

Daniel Langr daniel.langr at gmail.com
Mon Nov 8 02:32:25 CST 2010


Hi all,

Is there an equivalent of MatCreateMPIAIJWithSplitArrays function for 
symmetric matrices? Or does this function work with symmetric matrices?

I work with symmetric matrices that are extremely expensive to compute 
and I don't know their structure in advance. So to do preallocation, it 
is not practical to compute a matrix twice - firstly only to get d_nnz 
and o_nnz arrays and secondly to set values. Now, I solve this problem 
by storing a matrix to a file system, which is faster but still far from 
ideal. The best solution I see is to compute a matrix only once, store 
it in memory as split CSR arrays and then just call something like 
MatCreateMPISBAIJWithSplitArrays.

Thanks,
Daniel



More information about the petsc-users mailing list