On Sat, Dec 11, 2010 at 12:56 AM, Jed Brown <span dir="ltr">&lt;<a href="mailto:jed@59a2.org">jed@59a2.org</a>&gt;</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">&lt;<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a>&gt;</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 (&quot;global index for any given 3-d index&quot;) for a map</div><div><br></div><div>��(i, j, k) --&gt; �((k*N + j)*M + i)*C + c</div><div><br>
</div><div>I can&#39;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 &quot;global index&quot; is in the &quot;PETSc ordering&quot;. �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&#39;t think that code exists in PETSc. �It wouldn&#39;t be too hard to write, but it&#39;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) { &lt;apply BC&gt; }</div><div><br></div><div>Can&#39;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>