<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
Thanks for your kind reply. It helps me very much.<br>
<br>
leejearl<br>
<br>
<div class="moz-cite-prefix">On 2017年05月29日 15:47, Dave May wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAJ98EDqExAd=K+-kJ=a8m2mAtYCxjkdn6p5weseyBo=rcLF2Mw@mail.gmail.com">
<div><br>
<div class="gmail_quote">
<div>On Mon, 29 May 2017 at 08:39, leejearl <<a
href="mailto:leejearl@126.com" moz-do-not-send="true">leejearl@126.com</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div> 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?, </div>
</blockquote>
<div><br>
</div>
<div>I don't think so as Plex would have to somehow know what
geom quantity to use to define the size of IS (e.g. vertex,
cell, face, edge)</div>
<div><br>
</div>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>and what is the difference between ISCopy() and
ISDuplicate()?</div>
</blockquote>
<div><br>
</div>
<div>ISDuplicate allocates memory for a new with the same comm
and layout as the original IS AND copies values from the
original IS into the new one. (Note that this is slightly
different from other duplicate functions like VecDuplicate
which only allocate memory and does not copy values from the
orig vec.)</div>
<div><br>
</div>
<div>ISCopy does not allocate memory for the IS (passed as the
second arg), it only performs the copy of values.</div>
<div><br>
</div>
<div>Thanks </div>
<div> Dave </div>
<div><br>
</div>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><br>
<br>
Thanks,<br>
leejearl</div>
<div><br>
<br>
<div class="m_8698770728479569504moz-cite-prefix">On
2017年05月28日 19:35, Matthew Knepley wrote:<br>
</div>
<blockquote type="cite">
<div>
<div class="gmail_extra">
<div class="gmail_quote">On Sun, May 28, 2017 at
6:02 AM, Lawrence Mitchell <span><<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><br>
<br>
> On 28 May 2017, at 09:16, leejearl <<a
href="mailto:leejearl@126.com"
target="_blank" 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="m_8698770728479569504HOEnZb"><font
color="#888888"><br>
Lawrence<br>
</font></span></blockquote>
</div>
<br>
<br clear="all">
<div><br>
</div>
-- <br>
<div class="m_8698770728479569504gmail_signature"
data-smartmail="gmail_signature">
<div>
<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>
</div>
<div>
<pre class="m_8698770728479569504moz-signature" cols="72">--
李季
西北工业大学航空学院流体力学系
Phone: 17792092487
QQ: 188524324
</pre>
</div>
</blockquote>
</div>
</div>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
李季
西北工业大学航空学院流体力学系
Phone: 17792092487
QQ: 188524324
</pre>
</body>
</html>