[petsc-users] global index distributed arrays

Mohamad M. Nasr-Azadani mmnasr at gmail.com
Fri Dec 10 19:05:21 CST 2010


On Fri, Dec 10, 2010 at 4:56 PM, Jed Brown <jed at 59a2.org> wrote:

> On Sat, Dec 11, 2010 at 01:53, Matthew Knepley <knepley at gmail.com> wrote:
>
>> What are you guys talking about? He is asking ("global index for any given
>> 3-d index") for a map
>>
>>   (i, j, k) -->  ((k*N + j)*M + i)*C + c
>>
>> I can't imagine what you are searching for? The process which owns a given
>> index does not involve a search.
>>
>
> The "global index" is in the "PETSc ordering".  He wants this index for an
> arbitrary (i,j,k) which are not in the ghosted patch of the current process.
>  You either have to store the full mapping, on search lx,ly,lz to locate the
> owner, then compute the index relative to that process.  I don't think that
> code exists in PETSc.  It wouldn't be too hard to write, but it's not the
> most beautiful thing to do.
>

Mat, that's exactly came to my mind as the first solution. But I was hoping
that I could avoid that. As you said it is not that hard to write that
function, that's why I hoped that PETSc alread has that.
Thanks for your help,
Mohamad
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20101210/33e4f3d9/attachment-0001.htm>


More information about the petsc-users mailing list