[MOAB-dev] r4010 - in MOAB/trunk: doc examples

tautges at mcs.anl.gov tautges at mcs.anl.gov
Thu Jun 17 17:48:20 CDT 2010


Author: tautges
Date: 2010-06-17 17:48:19 -0500 (Thu, 17 Jun 2010)
New Revision: 4010

Modified:
   MOAB/trunk/doc/metadata_info.doc
   MOAB/trunk/examples/GeomSetHierarchy.cpp
Log:
Correcting the sense values used in comparisons, now they all work.

Updating the metadata info document to include a description of these senses.



Modified: MOAB/trunk/doc/metadata_info.doc
===================================================================
(Binary files differ)

Modified: MOAB/trunk/examples/GeomSetHierarchy.cpp
===================================================================
--- MOAB/trunk/examples/GeomSetHierarchy.cpp	2010-06-17 22:19:47 UTC (rev 4009)
+++ MOAB/trunk/examples/GeomSetHierarchy.cpp	2010-06-17 22:48:19 UTC (rev 4010)
@@ -64,15 +64,18 @@
         }
       }
       else if (1 == dim) {
+        sense_ents.clear();
+        senses.clear();
         rval = gt.get_senses(*ch_it, sense_ents, senses);
         if (moab::MB_SUCCESS != rval) continue;
         for (unsigned int i = 0; i < sense_ents.size(); i++) {
           rval = mb->tag_get_data(gid_tag, &sense_ents[i], 1, &pgid);
           std::cout << ent_names[dim+1] << " "   << pgid << ", " 
                     << ent_names[dim] << " " << chgid << " sense is: ";
-          if (1 == senses[i]) std::cout << "FORWARD" << std::endl;
-          else if (-1 == senses[i]) std::cout << "REVERSE" << std::endl;
-          else if (!senses[i]) std::cout << "BOTH" << std::endl;
+          if (1 == senses[i]) std::cout << "REVERSED" << std::endl;
+          else if (0 == senses[i]) std::cout << "FORWARD" << std::endl;
+          else if (-1 == senses[i]) std::cout << "UNKNOWN" << std::endl;
+          else std::cout << "(invalid)" << std::endl;
         }
       }
     }























More information about the moab-dev mailing list