[MOAB-dev] r1354 - MOAB/trunk
kraftche at mcs.anl.gov
kraftche at mcs.anl.gov
Mon Nov 5 10:33:12 CST 2007
Author: kraftche
Date: 2007-11-05 10:33:12 -0600 (Mon, 05 Nov 2007)
New Revision: 1354
Modified:
MOAB/trunk/DenseTagCollections.cpp
Log:
Fix bug in DensePageGroup::get_entities_with_tag_value:
o Step 1 past end of array
o Failure to find any entity for which handle%1024 == 0
Modified: MOAB/trunk/DenseTagCollections.cpp
===================================================================
--- MOAB/trunk/DenseTagCollections.cpp 2007-11-02 17:20:02 UTC (rev 1353)
+++ MOAB/trunk/DenseTagCollections.cpp 2007-11-05 16:33:12 UTC (rev 1354)
@@ -205,16 +205,18 @@
std::vector<DensePage>::iterator page_it;
const std::vector<DensePage>::iterator end = mDensePages[type].end();
int dum =0;
- MBEntityHandle handle = CREATE_HANDLE(type, MB_START_ID, dum);
+ MBEntityHandle handle = CREATE_HANDLE(type, 0, dum);
MBRange::iterator insert_iter = entities.begin();
+ int first_i = MB_START_ID;
for(page_it = mDensePages[type].begin(); page_it != end;
++page_it, handle += DensePage::mPageSize)
{
if (page_it->has_data()) {
- for (int i = 1; i <= DensePage::mPageSize; i++) {
+ for (int i = first_i; i < DensePage::mPageSize; i++) {
if (!page_it->memcmp(i, mBytesPerFlag, value))
- entities.insert(handle+i-1);
+ entities.insert(handle+i);
}
+ first_i = 0;
}
}
More information about the moab-dev
mailing list