[MOAB-dev] r1269 - MOAB/trunk

kraftche at mcs.anl.gov kraftche at mcs.anl.gov
Wed Sep 12 17:48:13 CDT 2007


Author: kraftche
Date: 2007-09-12 17:48:12 -0500 (Wed, 12 Sep 2007)
New Revision: 1269

Modified:
   MOAB/trunk/MBTest.cpp
Log:
add test case the demonstrates flaw in MBCore::get_entities_by_type_and_tag with a non-zero input meshset

Modified: MOAB/trunk/MBTest.cpp
===================================================================
--- MOAB/trunk/MBTest.cpp	2007-09-11 22:38:58 UTC (rev 1268)
+++ MOAB/trunk/MBTest.cpp	2007-09-12 22:48:12 UTC (rev 1269)
@@ -2815,6 +2815,38 @@
   if( entities.size() != times)  //should get as many hexes as you perviously marked
     return MB_FAILURE;
 
+    // test fetch by tag value again, this time limiting the results
+    // to the contents of an entity set
+  MBEntityHandle meshset;
+  result = MB->create_meshset( MESHSET_SET, meshset );
+  if (MB_SUCCESS != result)
+    return result;
+  result = MB->add_entities( meshset, test_range );
+  if (MB_SUCCESS != result)
+    return result;
+  
+  
+    //fetch the hex entities of type--MBHEX, tag-"junk_tag", and tag value -- 3489
+  entities.clear();
+  result = MB->get_entities_by_type_and_tag(meshset, MBHEX, &junk_tag, 
+                                      &ptr_data, 1, entities );
+  if (MB_SUCCESS != result)
+    return result;
+ 
+  if( entities.size() != times)  //should get as many hexes as you perviously marked
+    return MB_FAILURE;
+
+    //fetch the hex entities of type--MBHEX, tag-"stale_bits", and tag value -- 0x5
+  entities.clear();
+  result = MB->get_entities_by_type_and_tag(meshset, MBHEX, &stale_bits, 
+                                      &ptr_bits, 1, entities );
+  if (MB_SUCCESS != result)
+    return result;
+ 
+  if( entities.size() != times)  //should get as many hexes as you perviously marked
+    return MB_FAILURE;
+
+
   result = MB->tag_delete(stale_bits);
   if (MB_SUCCESS != result)
     return result;




More information about the moab-dev mailing list