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

iulian at mcs.anl.gov iulian at mcs.anl.gov
Sat Apr 2 15:22:34 CDT 2011


Author: iulian
Date: 2011-04-02 15:22:34 -0500 (Sat, 02 Apr 2011)
New Revision: 4711

Modified:
   MOAB/trunk/src/GeomTopoTool.cpp
Log:
if an edge is reset with 2 senses in the same face, forward and reverse, 
change the sense to SENSE_BOTH
with this change, dagmc_preproc iter_vol.sat seems to finish; Steve, please
check if this is fine.


Modified: MOAB/trunk/src/GeomTopoTool.cpp
===================================================================
--- MOAB/trunk/src/GeomTopoTool.cpp	2011-04-01 17:07:01 UTC (rev 4710)
+++ MOAB/trunk/src/GeomTopoTool.cpp	2011-04-02 20:22:34 UTC (rev 4711)
@@ -608,14 +608,25 @@
       std::vector<EntityHandle>::iterator it = std::find(higher_ents.begin(),
           higher_ents.end(), wrt_entity);
       if (it != higher_ents.end()) {
-        // we should not reset the sense
-        return MB_MULTIPLE_ENTITIES_FOUND;
+        // we should not reset the sense, if the sense is the same
+        // if the sense is different, put BOTH
+        unsigned int idx = it - higher_ents.begin();
+        int oldSense = senses[idx];
+        if (oldSense == sense)
+          return MB_SUCCESS; // sense already set fine
+        if (0!=oldSense && oldSense+sense !=0)
+          return MB_MULTIPLE_ENTITIES_FOUND;
+        senses[idx]=SENSE_BOTH; // allow double senses
+
       }
     }
-    // what happens if a var tag data was already set before, and now it is
-    // reset with a different size??
-    higher_ents.push_back(wrt_entity);
-    senses.push_back(sense);
+    else
+    {
+      // what happens if a var tag data was already set before, and now it is
+      // reset with a different size??
+      higher_ents.push_back(wrt_entity);
+      senses.push_back(sense);
+    }
     // finally, set the senses :
     int dum_size = higher_ents.size() * sizeof(EntityHandle);
     void *dum_ptr = &higher_ents[0];

















More information about the moab-dev mailing list