[MOAB-dev] r5956 - MOAB/trunk/tools/mbcslam

iulian at mcs.anl.gov iulian at mcs.anl.gov
Sat Jan 26 10:50:09 CST 2013


Author: iulian
Date: 2013-01-26 10:50:09 -0600 (Sat, 26 Jan 2013)
New Revision: 5956

Modified:
   MOAB/trunk/tools/mbcslam/Intx2Mesh.cpp
   MOAB/trunk/tools/mbcslam/Intx2Mesh.hpp
Log:
switch the advancing front strategy: advance from the euler grid (the second set), which is
completely covered by the lagrangian set (first set). 
before, we were advancing from the lagrangian set, and some corners could still be left out.
to do: merge the vertices after intersection


Modified: MOAB/trunk/tools/mbcslam/Intx2Mesh.cpp
===================================================================
--- MOAB/trunk/tools/mbcslam/Intx2Mesh.cpp	2013-01-24 19:44:39 UTC (rev 5955)
+++ MOAB/trunk/tools/mbcslam/Intx2Mesh.cpp	2013-01-26 16:50:09 UTC (rev 5956)
@@ -27,6 +27,7 @@
 {
   dbg_1=0;
   box_error=0;
+  my_rank=0;
 }
 
 Intx2Mesh::~Intx2Mesh()
@@ -149,7 +150,7 @@
   if (type == MBQUAD)
     nsides=4;
   ErrorCode rval;
-  mbs1 = mbset1; // is this the arrival or departure? I don't know yet
+  mbs1 = mbset1; // set 1 is departure, and it is completely covering the euler set on proc
   mbs2 = mbset2;
   outSet = outputSet;
 
@@ -190,129 +191,131 @@
   std::queue<EntityHandle> redQueue;
   redQueue.push(startRed);
 
-  Range toResetReds; // will be used to reset red flags for every blue quad
+  Range toResetBlues; // will be used to reset blue flags for every red quad
   // processed
 
+  /*if (my_rank==0)
+    dbg_1 = 1;*/
   unsigned char used = 1;
   unsigned char unused = 0; // for red flags
   // mark the start blue quad as used, so it will not come back again
-  mb->tag_set_data(BlueFlagTag, &startBlue, 1, &used);
-  while (!blueQueue.empty())
+  mb->tag_set_data(RedFlagTag, &startRed, 1, &used);
+  while (!redQueue.empty())
   {
-    // flags for the side : 0 means a red quad not found on side
-    // a paired red not found yet for the neighbors of blue
+    // flags for the side : 0 means a blue quad not found on side
+    // a paired blue not found yet for the neighbors of red
     EntityHandle n[4] = { EntityHandle(0) };
 
-    EntityHandle currentBlue = blueQueue.front();
-    blueQueue.pop();
+    EntityHandle currentRed = redQueue.front();
+    redQueue.pop();
     //        for (k=0; k<m_numPos; k++)
     //          redFlag[k] = 0;


More information about the moab-dev mailing list