[MOAB-dev] r4047 - MOAB/trunk/src/io

kraftche at cae.wisc.edu kraftche at cae.wisc.edu
Thu Jul 8 14:48:03 CDT 2010


Author: kraftche
Date: 2010-07-08 14:48:03 -0500 (Thu, 08 Jul 2010)
New Revision: 4047

Modified:
   MOAB/trunk/src/io/ReadHDF5.cpp
   MOAB/trunk/src/io/ReadHDF5.hpp
Log:
disabled optimization feature and some white space changes

Modified: MOAB/trunk/src/io/ReadHDF5.cpp
===================================================================
--- MOAB/trunk/src/io/ReadHDF5.cpp	2010-07-08 19:47:46 UTC (rev 4046)
+++ MOAB/trunk/src/io/ReadHDF5.cpp	2010-07-08 19:48:03 UTC (rev 4047)
@@ -809,8 +809,9 @@
 }
 
 ErrorCode ReadHDF5::search_tag_values( int tag_index,
-                                         const std::vector<int>& sorted_values,
-                                         Range& file_ids )
+                                       const std::vector<int>& sorted_values,
+                                       Range& file_ids,
+                                       bool sets_only )
 {
   ErrorCode rval;
   mhdf_Status status;
@@ -836,6 +837,9 @@
       name = mhdf_set_type_handle();
       start_id = fileInfo->sets.start_id;
     }
+    else if (sets_only) {
+      continue;
+    }
     else if (idx == -1) {
       name = mhdf_node_type_handle();
      start_id = fileInfo->nodes.start_id;
@@ -905,6 +909,15 @@
     return error(MB_FAILURE);
   assert( offset == indices.size() );
   std::sort( indices.begin(), indices.end() );
+  
+  if (sets_only) {
+    iter = std::lower_bound( indices.begin(), indices.end(), 
+                             fileInfo->sets.start_id + fileInfo->sets.count );
+    indices.erase( iter, indices.end() );
+    iter = std::lower_bound( indices.begin(), indices.end(), 
+                             fileInfo->sets.start_id );
+    indices.erase( indices.begin(), iter );
+  }
   copy_sorted_file_ids( &indices[0], indices.size(), file_ids );
   
   return MB_SUCCESS;  
@@ -981,9 +994,9 @@
 }
 
 ErrorCode ReadHDF5::search_tag_values( hid_t tag_table, 
-                                         unsigned long table_size,
-                                         const std::vector<int>& sorted_values,
-                                         std::vector<EntityHandle>& value_indices )
+                                       unsigned long table_size,
+                                       const std::vector<int>& sorted_values,


More information about the moab-dev mailing list