[petsc-users] Size of off-diagonal matrix

Jed Brown jed at 59A2.org
Thu Jun 23 10:17:13 CDT 2011


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().
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20110623/22a428a4/attachment.htm>


More information about the petsc-users mailing list