<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Fri, Nov 6, 2015 at 6:35 PM, Matthew Kury <span dir="ltr"><<a href="mailto:mkury@berkeley.edu" target="_blank">mkury@berkeley.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">Dear All, <div><br></div><div><span style="white-space:pre-wrap"> </span>I have been trying to figure out how to appropriately index a matrix that was created from a DMPlex with a section defined for it. </div><div><br></div><div><span style="white-space:pre-wrap"> </span> I created the matrix with DMCreateMatrix() and I tried to index the entries by using the ISLocalToGlobalMapping obtained from DMGetLocalToGlobalMapping, with the local indices being those obtained from PetscSectionGetOffset() with the appropriate points from the D.A.G. However this does not seem to work. </div></div></blockquote><div><br></div><div>It should work. However, you can always get the global section using DMGetDefaultGlobalSection() which directly gives global offsets,</div><div>although nonlocal offsets are stored as -(off+1).</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div><span style="white-space:pre-wrap"> </span>In particular, with the ISLocalToGlobalMapping, what I understand is that it gives the relationship of the local indexing to the global indexing, however there are negative numbers in this mapping which I fail to find an explanation of in the documentation. In addition, there do not appear to be redundant indexes to the global matrix as one would expect in a distributed DMPlex because there can be some of the same points on different processors. </div></div></blockquote><div><br></div><div>Yes, the negative numbers are -(off+1) for nonlocal offsets. I am not sure I understand your point about redundant offsets.</div><div><br></div><div> Thanks,</div><div><br></div><div> Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div>Any help is greatly appreciated. </div><div><br></div><div>Thank you for your time, </div><br><br><div>
<div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word"><div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word"><div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word"><div>Matthew W. Kury</div><div>Ph.D. Candidate</div><div>CMRL UC Berkeley</div><div>M.S. Mechanical Engineering UC Berkeley, 2014</div><div><br></div></div><br></div><br></div><br><br>
</div>
<br></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">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</div>
</div></div>