[MOAB-dev] Range contiguity method

Patrick Shriwise shriwise at wisc.edu
Wed Aug 9 19:52:01 CDT 2017


Hi Vijay,

After some exploring, I saw the psize method. That would do the trick.

Perhaps a quicker way would be to check that there is no more than one 
pair in the Range rather than iterating over them all, but there 
probably aren't many pairs in Ranges in practice. Is that right?

Cheers,

Patrick C. Shriwise
Research Fellow
University of Wisconsin - Madison
Engineering Research Building - Rm. 428
1500 Engineering Drive
Madison, WI 53706
(608) 446-8173

On 8/9/17 5:38 PM, Vijay S. Mahadevan wrote:
> Patrick, you are looking for something like Range::psize() [1], which
> returns the number of non-contiguous sequences in the object. Does
> that help ? If this is not what you are asking, them I'm unclear what
> you mean by "rapidly check that a Range object contains a set of
> contiguous values".
>
> Vijay
>
> [1] ftp://ftp.mcs.anl.gov/pub/fathom/moab-docs/classmoab_1_1Range.html#a04d1b55838117d5ef4ba3c4dfb4d2df0
>
> On Tue, Aug 8, 2017 at 11:30 PM, Patrick Shriwise <shriwise at wisc.edu> wrote:
>> Hi all,
>>
>>
>> I'm wondering if there is a way to rapidly check that a Range object
>> contains a set of contiguous values.
>>
>>
>> Naively, it seems that this can be done by checking that it is made up of
>> only one pair_node by looking at the  mNext & mPrev pointers to verify this
>> is the case.
>>
>>
>> This would allow some MOAB interfaces (such as the GeomTopoTool) to rapidly
>> determine if they are working only with contiguous EntitySets and take
>> advantage of this fact.
>>
>>
>> Cheers,
>>
>>
>>
>> Patrick



More information about the moab-dev mailing list