<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Feb 17, 2012, at 13:36 , Tim Tautges wrote:</div><blockquote type="cite"><div>The biggest problem with the behavior now, going by your summary, is that in case 3 below, both sets get the vertices and elements. &nbsp;</div></blockquote><div><br></div><div>This problem happens in *both* case 2 and case 3; the only difference is whether the containing set is created anew by iMesh_createStructuredMesh() or passed in preallocated. &nbsp;So the source of confusion (two sets both directly containing the vertices and hexes) will occur whether or not an existing set pointer is passed to the function.</div><div><br></div><div>But I think I see what you're getting at. &nbsp;In both cases, the set E (which contains the structured geometry and is tagged with ScdMesh tags) should be added to the set passed into iMesh_createStructuredMesh(). &nbsp;In neither case should the geometry be directly added to that set, since it will be accessible through E. &nbsp;I can certainly live with that, and I think it'd make life easy for possible file readers as you describe.</div><div><br></div><div>(Did I correctly understand what you said? &nbsp;I can come to your office and draw on the board to verify that we are thinking the same thing if you want.)</div><div>~S</div><div><br></div><blockquote type="cite"><div><font class="Apple-style-span" color="#000000"><br></font>On 02/17/2012 10:34 AM, Steve Jackson wrote:<br><blockquote type="cite">Hi Tim,<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">I am curious about the the behavior of the structured mesh code and its itaps extension.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">One of the parameters to iMesh_createStructuredMesh() is an entity handle pointer called set_handle. &nbsp;The parameter is treated three different ways:<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">1) If NULL, ignore.<br></blockquote><blockquote type="cite">2) If a pointer to NULL, allocate a new EntitySet and add all the contents of the created ScdMesh to that set.<br></blockquote><blockquote type="cite">3) If a pointer to non-NULL, add all the contents to the pointed-to EntitySet.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">"All the contents" means "the vertices, the hexahedra, and the entity set E representing the ScdBox."<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">That last entity set E is interesting because it is the set on which the BOX_DIMS and BOX_PERIODIC tags are set. &nbsp;This means that an itaps client who wants reliable access to the BOX_DIMS information has to do the following:<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">1) Pass in a non-NULL set_handle to iMesh_createStructuredMesh()<br></blockquote><blockquote type="cite">2) Look up the lone entity set E contained within set_handle<br></blockquote><blockquote type="cite">3) Access tag values on E<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">It's a possible source of confusion because set_handle and E contain identical vertices and elements. &nbsp;They are different in two ways:<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">a) set_handle contains E<br></blockquote><blockquote type="cite">b) E has ScdBox tag data set on it<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">My instinct says that this is a needless complexity. &nbsp;The set that a user is likely to want is E, rather than a set that contains E as well as all of E's geometry.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">If I were to propose an alternative, it would be to treat the set_handle parameter to iMesh_createStructuredMesh() as follows:<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">1) If NULL, ignore.<br></blockquote><blockquote type="cite">2) If non-NULL, set equal to E, the entity set that represents the new ScdBox.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">The if a user wants a new entity set containing the ScdBox's geometry, they can create one separately and copy the contents of E into it. &nbsp;I'm willing to make such a change if it seems safe to you.<br></blockquote><blockquote type="cite">~S<br></blockquote><blockquote type="cite"><br></blockquote><br>--&nbsp;<br>================================================================<br>"You will keep in perfect peace him whose mind is<br>&nbsp;steadfast, because he trusts in you." &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Isaiah 26:3<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Tim Tautges &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Argonne National Laboratory<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(<a href="mailto:tautges@mcs.anl.gov">tautges@mcs.anl.gov</a>) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(telecommuting from UW-Madison)<br>phone (gvoice): (608) 354-1459 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;1500 Engineering Dr.<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;fax: (608) 263-4499 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Madison, WI 53706<br><br></div></blockquote></div></body></html>