[MOAB-dev] Fwd: Re: iMesh / ScdMesh questions

Steve Jackson sjackson at cae.wisc.edu
Fri Feb 17 14:09:39 CST 2012


On Feb 17, 2012, at 13:36 , Tim Tautges wrote:
> The biggest problem with the behavior now, going by your summary, is that in case 3 below, both sets get the vertices and elements.  

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.  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.

But I think I see what you're getting at.  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().  In neither case should the geometry be directly added to that set, since it will be accessible through E.  I can certainly live with that, and I think it'd make life easy for possible file readers as you describe.

(Did I correctly understand what you said?  I can come to your office and draw on the board to verify that we are thinking the same thing if you want.)
~S

> 
> On 02/17/2012 10:34 AM, Steve Jackson wrote:
>> Hi Tim,
>> 
>> I am curious about the the behavior of the structured mesh code and its itaps extension.
>> 
>> One of the parameters to iMesh_createStructuredMesh() is an entity handle pointer called set_handle.  The parameter is treated three different ways:
>> 
>> 1) If NULL, ignore.
>> 2) If a pointer to NULL, allocate a new EntitySet and add all the contents of the created ScdMesh to that set.
>> 3) If a pointer to non-NULL, add all the contents to the pointed-to EntitySet.
>> 
>> "All the contents" means "the vertices, the hexahedra, and the entity set E representing the ScdBox."
>> 
>> That last entity set E is interesting because it is the set on which the BOX_DIMS and BOX_PERIODIC tags are set.  This means that an itaps client who wants reliable access to the BOX_DIMS information has to do the following:
>> 
>> 1) Pass in a non-NULL set_handle to iMesh_createStructuredMesh()
>> 2) Look up the lone entity set E contained within set_handle
>> 3) Access tag values on E
>> 
>> It's a possible source of confusion because set_handle and E contain identical vertices and elements.  They are different in two ways:
>> 
>> a) set_handle contains E
>> b) E has ScdBox tag data set on it
>> 
>> My instinct says that this is a needless complexity.  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.
>> 
>> If I were to propose an alternative, it would be to treat the set_handle parameter to iMesh_createStructuredMesh() as follows:
>> 
>> 1) If NULL, ignore.
>> 2) If non-NULL, set equal to E, the entity set that represents the new ScdBox.
>> 
>> 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.  I'm willing to make such a change if it seems safe to you.
>> ~S
>> 
> 
> -- 
> ================================================================
> "You will keep in perfect peace him whose mind is
>  steadfast, because he trusts in you."               Isaiah 26:3
> 
>             Tim Tautges            Argonne National Laboratory
>         (tautges at mcs.anl.gov)      (telecommuting from UW-Madison)
> phone (gvoice): (608) 354-1459      1500 Engineering Dr.
>            fax: (608) 263-4499      Madison, WI 53706
> 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/moab-dev/attachments/20120217/6ccebfc0/attachment.htm>


More information about the moab-dev mailing list