[petsc-users] Size of off-diagonal matrix

John Fettig john.fettig at gmail.com
Thu Jun 23 10:19:00 CDT 2011


On Thu, Jun 23, 2011 at 11:17 AM, Jed Brown <jed at 59a2.org> wrote:
> On Thu, Jun 23, 2011 at 17:09, John Fettig <john.fettig at gmail.com> wrote:
>>
>> Is there any way to access the map from global numbering to the
>> compressed numbering?
>
> 1. Certainly not before you create the matrix.
> 2. You have this information in some form if you can call
> MatCreateMPIAIJWithArrays(). Scan through the whole local block and make a
> sorted list of all the off-process entries. Then scan through again and look
> up each off-process entry in that sorted list to get its index.
> 3. But this is a waste of time, just call MatCreateMPIAIJWithArrays() or
> (better) use MatSetValues().

Ok, thanks!

John


More information about the petsc-users mailing list