[petsc-users] MatCreateMPIAIJWithSplitArrays for symmetric matrix?

Daniel Langr daniel.langr at gmail.com
Mon Nov 8 07:16:15 CST 2010


Dne 8.11.2010 14:01, Jed Brown napsal(a):
> On Mon, Nov 8, 2010 at 13:47, Daniel Langr <daniel.langr at gmail.com
> <mailto:daniel.langr at gmail.com>> wrote:
>
>     Great, helps much, that is something I was hoping for :). As for
>     now, we can generate matrix in-order. In the future it seems we will
>     need to generate matrix in "transposed" order, e.g. row-by-row order
>     for the lower triangular part. But then I suppose we will need to
>     use MatMultTranspose() or MatCreateTranspose() if the performance
>     won't suffer much (I have not tried it yet, so I have no idea about
>     it for now.)
>
>
> Well, the distinguishing property of symmetric matrices is that they are
> equal to their transpose. :-)
>
> For non-symmetric matrices, MatMultTranspose (perhaps accessed as
> MatMult via MatCreateTranspose) is about the same speed as MatMult.
>
> Jed

I meant something else but wrote it wrong, shame on me :). I thought 
that when I use MatCreateTranspose() for a symmetric matrix, I will be 
able to preallocate and set values for lower part (instead of upper 
part) in row-by-row order, as I generate them. But I am not sure about it.

Daniel



More information about the petsc-users mailing list