On Sat, Dec 11, 2010 at 12:56 AM, Jed Brown <span dir="ltr"><<a href="mailto:jed@59a2.org">jed@59a2.org</a>></span> wrote:<br><div class="gmail_quote"><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>I am not sure why you would need to access regions outside your local piece. For instance,<div>consider how we treat boundary conditions. This is access to a fixed index, but we check on</div><div>
each process</div><div><br></div><div>��if (i == i_bc) { <apply BC> }</div><div><br></div><div>Can't you do the same thing with your extra rows?</div><div><br></div><div>�� Matt<br clear="all"><br>-- <br>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>
-- Norbert Wiener<br>
</div>