[MOAB-dev] get_entities_by_handle - entities do not include meshset entities

Tim Tautges (ANL) tautges at mcs.anl.gov
Fri Mar 14 15:44:51 CDT 2014


[cc'ing moab-dev because this might be of general interest...]

Ok, yes, that is expected behavior.  The reasoning behind it is that if you're asking to recurse through contained sets, 
chances are you're interested in entities and not sets.  I can see where in some cases this might not be the case, but I 
would still assert that this isn't the more common case.

Note that this behavior is noted in the documentation of the 'recursive' argument to that function, at least in the 
master version (but I'm guessing probably in 4.6 as well, since I don't recall that changing recently).

- tim

On 03/14/2014 01:08 PM, MICHAEL CORTIS wrote:
> Tim,
>
> I've create a simple example and discovered the following:
> if use TRUE for recursive search, such as:
>
> Range tempRange
> rval = mb->get_entities_by_handle(*mit,tempRange,true);
>
> then, the contained meshsets won't be listed in the range,
>
> but if the recursive is FALSE,
>
> I will get those meshset 1 level below listed in the range.
>
> Why, when recursive search in all contained meshsets, these contained meshsets won't be listed in the range?
>
> if you want the program, please let me know, and btw, I am using MOAB 4.6.
> Kind regards
>
> Michael
>
> On 14 Mar 2014, at 15:03, "Tim Tautges (ANL)" <tautges at mcs.anl.gov <mailto:tautges at mcs.anl.gov>> wrote:
>
>> That's almost certainly not true.  Can you confirm this with a simple test?
>>
>> - tim
>>
>> On 03/14/2014 09:17 AM, MICHAEL CORTIS wrote:
>>> Dear Tim,
>>>
>>> I've noticed that when using get_entities_by_handle,
>>> the range won't contained meshset entities which are in the handle.
>>> Believe that one should remark in the documentation that only vertices/edges/tri/tet are retrieved,
>>> if there is no plan to gather the meshset entities from a handle into the range/vector.
>>>
>>> Kind regards
>>>
>>> Michael
>>>
>>
>> --
>> ================================================================
>> "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 <mailto:tautges at mcs.anl.gov>)      (telecommuting from UW-Madison)
>>  phone (gvoice): (608) 354-1459      1500 Engineering Dr.
>>             fax: (608) 263-4499      Madison, WI 53706
>>
>

-- 
================================================================
"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