[petsc-dev] bug in ISGlobalToLocalMappingApply

Stefano Zampini stefano.zampini at gmail.com
Thu Feb 12 03:30:13 CST 2015

Me and Lisandro just found a bug in the current implementation
of ISGlobalToLocalMappingApply when bs>1. Please find attached a patch with
a possible fix.

The issue is related with the convention used for the computation of the
largest index in global ordering. In ISGlobalToLocalMappingSetUp_Private
"end" is the largest index in global ordering, so the couple "start,end"
defines a closed interval.

When it comes to map from global to local in ISGlobalToLocalMappingApply,
indices larger the bs*end are not mapped back to local ordering, and thus
the last bs-1 global indices are not mapped back.

Another possible fix would consist in changing the convention used for the
computation of "end" (say, as the interval [start,end), more C friendly),
but it will require more changes to the code, and maybe affect other part
of the code where the private data of the ISLocalToGlobalMapping object is
directly used.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20150212/4ec1b9ff/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch_isltog
Type: application/octet-stream
Size: 1733 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20150212/4ec1b9ff/attachment.obj>

More information about the petsc-dev mailing list