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

Tim Tautges tautges at engr.wisc.edu
Fri Feb 17 13:37:21 CST 2012


[Forwarding to MOAB-dev since it might be of general interest...]


-------- Original Message --------
Subject: Re: iMesh / ScdMesh questions
Date: Fri, 17 Feb 2012 13:36:55 -0600
From: Tim Tautges <tautges at mcs.anl.gov>
To: Steve Jackson <stjackson at wisc.edu>
CC: James Porter <jvporter at wisc.edu>

It's that way because sometimes the underlying function is called from a reader, which itself was passed a set by the
application.  In some cases it could be that that set already contained other structured sets, or was a collection of
data not all of which was structured.

The biggest problem with the behavior now, going by your summary, is that in case 3 below, both sets get the vertices
and elements.  I think a better behavior would be to put them in only the set E.  Then, you could get the behavior you
prefer, i.e. one set with just the vertices and elements and marked as a structured set (case 2), while applications
could also get back the equivalent of file sets that possibly contained subsets representing structured boxes.  Could
you live with that?

- tim

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



More information about the moab-dev mailing list