[MOAB-dev] r5006 - MOAB/trunk/src

kraftche at cae.wisc.edu kraftche at cae.wisc.edu
Wed Jun 15 10:04:58 CDT 2011


Author: kraftche
Date: 2011-06-15 10:04:57 -0500 (Wed, 15 Jun 2011)
New Revision: 5006

Modified:
   MOAB/trunk/src/MeshSet.cpp
Log:
a few more comments clarifying ranged_insert_entities

Modified: MOAB/trunk/src/MeshSet.cpp
===================================================================
--- MOAB/trunk/src/MeshSet.cpp	2011-06-15 14:45:34 UTC (rev 5005)
+++ MOAB/trunk/src/MeshSet.cpp	2011-06-15 15:04:57 UTC (rev 5006)
@@ -468,6 +468,7 @@
       break;
     
       // check if we need to prepend to the current range block
+      // (the else clause)
     if (i->first >= list_read[0]) 
       list_write[0] = list_read[0];
     else {
@@ -488,9 +489,12 @@
     
       // merge subsequent blocks in meshset
     for (;list_read != list_end && list_read[0] <= i->second; list_read += 2) {
-      if (adj)
+      if (adj) {
+        // iterate over gap between range pairs because all of those handles
+        // are contained in the list of new entities to add.
       	for (EntityHandle h = list_write[1]+1; h < list_read[0]; ++h)
       	  adj->add_adjacency( h, my_handle, false );
+      }
       list_write[1] = list_read[1];
     }
     
@@ -527,7 +531,7 @@
     // Second pass: insert non-mergable range pairs
     // All range pairs in the input are either completely disjoint from
     // the ones in the mesh set and must be inserted or are entirely contained
-    // within range pair in the mesh set.
+    // within a range pair in the mesh set.
   assert( begin != end ); // can't have items to insert if given empty input list
   pair_iter_t ri = end; --ri;
   list_write = list + new_list_size - 2;


















More information about the moab-dev mailing list