<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
Hi, all:<br>
I have create a IS for every cell in dmplex by the following steps:<br>
1. Creating a integer array which size is matched to the number of
cells. <br>
2. Use the routine "ISCreateGeneral" to create a corresponding IS.<br>
<br>
Is there any routine which can create a IS for every cell in the
dmplex directly?, and what is the difference between ISCopy() and
ISDuplicate()?<br>
<br>
Thanks,<br>
leejearl<br>
<br>
<div class="moz-cite-prefix">On 2017年05月28日 19:35, Matthew Knepley
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAMYG4G=xNRgkzKnwJDH0H4adUGUyJ154Vroiaxwqo14JGSRf1w@mail.gmail.com">
<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" moz-do-not-send="true">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" moz-do-not-send="true">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/%7Emk51/"
target="_blank" moz-do-not-send="true">http://www.caam.rice.edu/~mk51/</a><br>
</div>
</div>
</div>
</div>
</div>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
李季
西北工业大学航空学院流体力学系
Phone: 17792092487
QQ: 188524324
</pre>
</body>
</html>