[MOAB-dev] Order of entities in unordered entity sets?

Paul Wilson wilsonp at engr.wisc.edu
Tue Jun 1 19:55:45 CDT 2010


For what it's worth,

Having read this exchange 3 times, I am thoroughly confused! As Jim 
noted, perhaps there is too much ambiguity in the terminology used here?

[Thankfully nothing I do right now relies on me understanding this.]

Paul

Tim Tautges wrote:
> Groan; I won't even bother to explain the convoluted thinking behind 
> my last answer.
>
> The description below should be what you see; isList=true should give 
> you a vector, which preserves order and allows duplicates; =false 
> should return ordered entities.
>
> The only thing I can think of is if you're asking for entities 
> recursively and there are contained sets.  Is that the case?
>
> - tim
>
> On 06/01/2010 06:53 PM, James Porter wrote:
>> I'm just going on what the iMesh.h documentation says:
>>
>> * Create an entity set, either ordered (isList=1) or unordered
>> * (isList=0).  Unordered entity sets can contain a given entity or
>> * set only once.
>> ...
>> * \param isList If non-zero, an ordered list is created, otherwise an
>> *        unordered set is created.
>>
>> It was my impression that "ordered" here meant "the order in which 
>> you add entities is preserved", NOT "retrieving entities will 
>> retrieve them in order". That is, when isList is true, it looks like 
>> an std::list and when isList is false, it looks like an std::set. If 
>> this is wrong, we should probably update the documentation (maybe we 
>> should anyway, since "ordered" can be ambiguous).
>>
>> Anyway, to remove any ambiguity, what I mean is that I have an 
>> std::set-like entity set, and after adding a bunch of entities to it, 
>> I try to get them back, but the result looks like this: { vertices, 
>> edges, faces, more vertices }. The behavior doesn't seem to match 
>> either type of entity set, since the order in which I add stuff is 
>> edges+faces first and then vertices.
>>
>> - Jim
>>
>> On 06/01/10, Tim Tautges<tautges at mcs.anl.gov>  wrote:
>>
>>> Um, if isList=false, the set should be ordered.  If it is unordered, 
>>> isList should be true, which means it is NOT stored in order.  
>>> Basically, an iMesh set is either a set or a list.
>>>
>>> - tim
>>>
>>> On 06/01/2010 06:05 PM, James Porter wrote:
>>>> Hey all,
>>>>
>>>> I was under the impression that unordered entity sets 
>>>> (isList=false) in
>>>> MOAB store their entities in sorted order, which means that they're 
>>>> also
>>>> sorted by dimension. However, I'm seeing vertices stored *after* edges
>>>> and faces in some code from MeshKit. If this is a bug, I'll see if 
>>>> I can
>>>> come up with a minimal test-case that fails, but I wanted to make sure
>>>> I'm not going crazy first.
>>>>
>>>> - Jim
>>>>
>>>>
>>>
>>> -- 
>>> ================================================================
>>> "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: (608) 263-8485      1500 Engineering Dr.
>>>             fax: (608) 263-4499      Madison, WI 53706
>>
>

-- 
Paul Wilson

-- ------------------------------------------------------------------ --
Paul P.H. Wilson              419 Engineering Research Building
wilsonp at engr.wisc.edu                       1500 Engineering Dr
ph/fax: 608/263-0807                          Madison, WI 53706

           My calendar: http://bit.ly/pphw-calendar

       Computational Nuclear Engineering Research Group
               http://cnerg.engr.wisc.edu

          Associate Professor, Nuclear Engineering
              Engineering Physics Department     
               http://www.engr.wisc.edu/ep       

        Chair, Energy Analysis & Policy Certificate
         Nelson Institute for Environmental Studies
                http://nelson.wisc.edu/eap/

          Contributing to the joy and improvement
                  of all those around me

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3297 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.mcs.anl.gov/pipermail/moab-dev/attachments/20100601/7fa8933b/attachment.bin>


More information about the moab-dev mailing list