[MOAB-dev] r3449 - MOAB/trunk

kraftche at cae.wisc.edu kraftche at cae.wisc.edu
Wed Jan 20 11:06:38 CST 2010


Author: kraftche
Date: 2010-01-20 11:06:38 -0600 (Wed, 20 Jan 2010)
New Revision: 3449

Modified:
   MOAB/trunk/TagTest.cpp
Log:
one more test of bit tags to reassure myself that things are now working correctly

Modified: MOAB/trunk/TagTest.cpp
===================================================================
--- MOAB/trunk/TagTest.cpp	2010-01-20 16:02:44 UTC (rev 3448)
+++ MOAB/trunk/TagTest.cpp	2010-01-20 17:06:38 UTC (rev 3449)
@@ -1742,7 +1742,18 @@
     CHECK_ERR( rval );
     CHECK_EQUAL( 1, (int)value );
   }
-  
+    // clear values individually
+  for (MBRange::iterator j = verts.begin(); j != verts.end(); ++j)
+  {
+    char value = '\0';
+    rval = mb.tag_set_data( tag1, &*j, 1, &value );
+    CHECK_ERR( rval );
+  }
+    // retrieve values using range
+  rval = mb.tag_get_data( tag1, verts, &values[0] );
+  CHECK_ERR(rval);
+  size_t first_one = std::find(values.begin(), values.end(), '\001') - values.begin();
+  CHECK_EQUAL( values.size(), first_one );
 }
 
 void setup_mesh( MBInterface& mb )



More information about the moab-dev mailing list