[petsc-users] Size of off-diagonal matrix

John Fettig john.fettig at gmail.com
Thu Jun 23 09:59:15 CDT 2011


On Thu, Jun 23, 2011 at 10:50 AM, Jed Brown <jed at 59a2.org> wrote:
> On Thu, Jun 23, 2011 at 16:47, John Fettig <john.fettig at gmail.com> wrote:
>>
>> I'm trying to use MatCreateMPIAIJWithSplitArrays, but it isn't clear
>> to me how the off-diagonal portion is supposed to be constructed.
>
> Okay, it's defined by compressing all the sorted off-process entries and
> then defining the sequential matrix operating on those values.

I understand everything you say here except what "compressing" means.
It is compressed by virtue of being in CSR format, but then you do
some additional mapping with the column indices that further
compresses it? What purpose does changing the column indices serve?

> Unless you already happen to use the same format, you're better off using
> MatSetValues().

We already have a distributed CSR matrix that works with
MatCreateMPIAIJWithArrays, but I was hoping to avoid the copy if
possible.  If it is too difficult for me to understand how the
off-diagonal matrix is stored, then I will just stick with the copying
version.

John


More information about the petsc-users mailing list