[MOAB-dev] r3683 - MOAB/trunk/examples/simple

tautges at mcs.anl.gov tautges at mcs.anl.gov
Sat Mar 20 12:59:25 CDT 2010


Author: tautges
Date: 2010-03-20 12:59:25 -0500 (Sat, 20 Mar 2010)
New Revision: 3683

Modified:
   MOAB/trunk/examples/simple/GetEntities.cpp
Log:
Clearing a range, and printing the # entities of each dimension.



Modified: MOAB/trunk/examples/simple/GetEntities.cpp
===================================================================
--- MOAB/trunk/examples/simple/GetEntities.cpp	2010-03-20 00:00:20 UTC (rev 3682)
+++ MOAB/trunk/examples/simple/GetEntities.cpp	2010-03-20 17:59:25 UTC (rev 3683)
@@ -16,7 +16,9 @@
 
     // iterate over dimensions
   for (int d = 0; d <= 3; d++) {
+    ents.clear();
     rval = mb->get_entities_by_dimension(0, d, ents);
+    std::cout << "Found " << ents.size() << " " << d << "-dimensional entities:" << std::endl;
     for (MBRange::iterator it = ents.begin(); it != ents.end(); it++) {
       MBEntityHandle ent = *it;
       std::cout << "Found d=" << d << " entity " 



More information about the moab-dev mailing list