[petsc-users] global index distributed arrays

Matthew Knepley knepley at gmail.com
Fri Dec 10 19:01:46 CST 2010


On Sat, Dec 11, 2010 at 12:56 AM, 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.
>

I am not sure why you would need to access regions outside your local piece.
For instance,
consider how we treat boundary conditions. This is access to a fixed index,
but we check on
each process

  if (i == i_bc) { <apply BC> }

Can't you do the same thing with your extra rows?

   Matt

-- 
What most experimenters take for granted before they begin their experiments
is infinitely more interesting than any results to which their experiments
lead.
-- Norbert Wiener
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20101211/9b689383/attachment.htm>


More information about the petsc-users mailing list