> 2011/1/26 Gong Ding <gdiso at ustc.edu> > >> I have unsymmetrical jacobian matrix in MPIAIJ format (it is nearlly >> symmetric, I guess). I'd like to pad it to symmetrical pattern by just add 0 >> to corresponding matrix entry, which is required to some matrix partition >> step. > How are you obtaining the matrix? The best way is to preallocate those > extra zeros. Yes, it is the problem. I have to build the pattern of symmetrical matrix for memory allocation from the unsymmetrical matrix. I don't konw how to do it with petsc API. Any good idea? After build the symmetrical matrix, things are easy.
> A traditional purely algebraic way is to add the transpose (zeroed in this > case), but transpose is a bad operation to perform in parallel so I would > try to avoid it.
