[MOAB-dev] r2076 - MOAB/trunk/tools/size

kraftche at mcs.anl.gov kraftche at mcs.anl.gov
Mon Sep 22 15:08:28 CDT 2008


Author: kraftche
Date: 2008-09-22 15:08:28 -0500 (Mon, 22 Sep 2008)
New Revision: 2076

Modified:
   MOAB/trunk/tools/size/size.cpp
Log:
- Update help for -l and -ll options

- Make -ll and -l be cumulative (as the other options are) such that
  specifying both -l and -ll results in the output for both options 
  being produced.
  
- Fix bogus warning about questionable stats when std.dev. of entity
  sizes is zero (e.g. regular mesh with all edge lengths equal.)



Modified: MOAB/trunk/tools/size/size.cpp
===================================================================
--- MOAB/trunk/tools/size/size.cpp	2008-09-22 19:42:27 UTC (rev 2075)
+++ MOAB/trunk/tools/size/size.cpp	2008-09-22 20:08:28 UTC (rev 2076)
@@ -44,10 +44,11 @@
 
 void usage( const char* exe )
 {
-  std::cerr << "Usage: " << exe << " [-g] [-m] <mesh file list>" << std::endl
-            << "-g : print counts by geometric owner" << std::endl
-            << "-l : print counts of mesh" << std::endl
-            << "-m : print counts per block/boundary" << std::endl
+  std::cerr << "Usage: " << exe << " [-g] [-m] [-l] [-ll] <mesh file list>" << std::endl
+            << "-g  : print counts by geometric owner" << std::endl
+            << "-m  : print counts per block/boundary" << std::endl
+            << "-l  : print counts of mesh" << std::endl
+            << "-ll : verbose listing of every entity" << std::endl
             ;
   exit(1);
 }
@@ -272,7 +273,7 @@
 
     double tmp_dbl = s.sqr / s.count - s.sum*s.sum / (double)s.count / (double)s.count;
     if (tmp_dbl < 0.0) {
-      if (-tmp_dbl < 100.0*DBL_EPSILON)
+      if (tmp_dbl < -100.0*DBL_EPSILON)
         std::cout << "WARNING: stat values dubious, s^2 - sig_s = " << tmp_dbl << std::endl;
       tmp_dbl = 0.0;
     }
@@ -464,7 +465,8 @@
     }
 
     if (just_list) moab.list_entities(0, 1);
-    else if (just_list_basic) moab.list_entities(0, 0);
+   
+    if (just_list_basic) moab.list_entities(0, 0);
     
     moab.delete_mesh();
   }




More information about the moab-dev mailing list