<br><br><div class="gmail_quote">On Fri, Dec 10, 2010 at 4:56 PM, Jed Brown <span dir="ltr"><<a href="mailto:jed@59a2.org">jed@59a2.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im"><div class="gmail_quote">On Sat, Dec 11, 2010 at 01:53, Matthew Knepley <span dir="ltr"><<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>What are you guys talking about? He is asking ("global index for any given 3-d index") for a map</div><div><br></div><div> (i, j, k) --> ((k*N + j)*M + i)*C + c</div><div><br>
</div><div>I can't imagine what you are searching for? The process which owns a given index does not involve a search.</div></blockquote></div><br></div><div>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.</div>
</blockquote></div><br><div>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. </div>
<div>Thanks for your help, </div><div>Mohamad</div><div><br></div>