[MOAB-dev] r4606 - MOAB/trunk/itaps/imesh

jvporter at wisc.edu jvporter at wisc.edu
Thu Mar 17 16:43:49 CDT 2011


Author: jvporter
Date: 2011-03-17 16:43:49 -0500 (Thu, 17 Mar 2011)
New Revision: 4606

Modified:
   MOAB/trunk/itaps/imesh/iMesh_MOAB.cpp
Log:
Ensure that the adjacency table only reports available/unavailable on the diagonal.


Modified: MOAB/trunk/itaps/imesh/iMesh_MOAB.cpp
===================================================================
--- MOAB/trunk/itaps/imesh/iMesh_MOAB.cpp	2011-03-17 21:18:50 UTC (rev 4605)
+++ MOAB/trunk/itaps/imesh/iMesh_MOAB.cpp	2011-03-17 21:43:49 UTC (rev 4606)
@@ -259,12 +259,19 @@
 // modify the adjacency table to match the ITAPS spec's expectations
 static void munge_adj_table(int *adjTable, int geom_dim)
 {
+    // If geom_dim is 2, 3D adjacencies are unavailable. This may change!
   if (geom_dim == 2) {
     for (size_t i = 0; i < 16; ++i) {
       if (i % 4 == 3 || i >= 12)
         adjTable[i] = iBase_UNAVAILABLE;
     }
   }
+
+    // Ensure that diagonal entries are only available/unavailable.
+  for (size_t i = 0; i < 16; i+=5) {
+    if (adjTable[i] != iBase_UNAVAILABLE)
+      adjTable[i] = iBase_AVAILABLE;
+  }
 }
 
 #ifdef __cplusplus





























More information about the moab-dev mailing list