<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Sun, May 28, 2017 at 6:02 AM, Lawrence Mitchell <span dir="ltr"><<a href="mailto:lawrence.mitchell@imperial.ac.uk" target="_blank">lawrence.mitchell@imperial.ac.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><br>
<br>
> On 28 May 2017, at 09:16, leejearl <<a href="mailto:leejearl@126.com">leejearl@126.com</a>> wrote:<br>
><br>
> Hi, Dave: I want to store a PetscInt tag for every cell of the dmplex with the struct. Thanks,<br>
<br>
</span>You probably want to use a DMLabel to store these ids. Unless you have a different I'd for every cell.</blockquote><div><br></div><div>Several things to think about:</div><div><br></div><div>1) If you want to store a tag for EVERY cell, then just use an IS. Cell numberings are guaranteed to be</div><div>    contiguous and start from 0.</div><div><br></div><div>2) If you want to tag only SOME cells, then use a DMLabel as Lawrence suggests. This uses hash tables</div><div>    for fast construction, and sorted lists for fast search and retrieval.</div><div><br></div><div>3) If you want to store a VARIABLE number of data items per cell, then use a Section and an array that you allocate.</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"><span class="HOEnZb"><font color="#888888"><br>
Lawrence<br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>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><br></div><div><a href="http://www.caam.rice.edu/~mk51/" target="_blank">http://www.caam.rice.edu/~mk51/</a><br></div></div></div>
</div></div>