[MOAB-dev] r3871 - MOAB/trunk/tools

kraftche at cae.wisc.edu kraftche at cae.wisc.edu
Mon May 10 09:12:20 CDT 2010


Author: kraftche
Date: 2010-05-10 09:12:20 -0500 (Mon, 10 May 2010)
New Revision: 3871

Modified:
   MOAB/trunk/tools/size.cpp
Log:
Quick fix-up of mbsize:
  o correct help data
  o make -m and -g flags work for -l and -ll modes
  o don't list default size info if -l or -ll mode
  o update readme


Modified: MOAB/trunk/tools/size.cpp
===================================================================
--- MOAB/trunk/tools/size.cpp	2010-05-10 13:56:37 UTC (rev 3870)
+++ MOAB/trunk/tools/size.cpp	2010-05-10 14:12:20 UTC (rev 3871)
@@ -48,7 +48,7 @@
 
 void usage( const char* exe )
 {
-  std::cerr << "Usage: " << exe << " [-g] [-m] [-l] [-ll] <mesh file list>" << std::endl
+  std::cerr << "Usage: " << exe << " [-g] [-m] [-t|-l|-ll] <mesh file list>" << std::endl
             << "-g  : print counts by geometric owner" << std::endl
             << "-m  : print counts per block/boundary" << std::endl
             << "-t  : print counts by tag" << std::endl
@@ -459,8 +459,9 @@
     
     if (tag_count)
       rval = gather_tag_counts( 0, file_counts );
-    else
+    else if (!just_list && !just_list_basic)
       rval = gather_set_stats( 0, file_stats );
+
     if (MB_SUCCESS != rval)
     {
       fprintf(stderr, "Error processing mesh from file: %s\n", f->c_str());
@@ -472,6 +473,12 @@
       print_tag_counts( file_counts );
       file_counts.clear();
     }
+    else if (just_list) {
+      mb.list_entities( 0, 1 );
+    }
+    else if (just_list_basic) {
+      mb.list_entities( 0, 0 );
+    }
     else {
       total_stats.add( file_stats );
       print_stats( file_stats );
@@ -535,15 +542,20 @@
         printf( "%s %d:\n", geom_type_names[dim], id );
         if (tag_count)
           rval = gather_tag_counts( *i, file_counts );
-        else
+        else if (!just_list && !just_list_basic)
           rval = gather_set_stats( *i, file_stats );
         
         if (MB_SUCCESS != rval)
           fprintf(stderr, "Error processing mesh from file: %s\n", f->c_str());
         else if (tag_count)
           print_tag_counts( file_counts );
+        else if (just_list)
+          mb.list_entities( 0, 1 );


More information about the moab-dev mailing list