[cig-commits] r13764 - cs/cigma/trunk/src

luis at geodynamics.org luis at geodynamics.org
Wed Dec 17 02:33:30 PST 2008


Author: luis
Date: 2008-12-17 02:33:29 -0800 (Wed, 17 Dec 2008)
New Revision: 13764

Modified:
   cs/cigma/trunk/src/cli_compare_cmd.cpp
Log:
Renamed option to --timer-frequency and changed default of threshold to +infinity

Modified: cs/cigma/trunk/src/cli_compare_cmd.cpp
===================================================================
--- cs/cigma/trunk/src/cli_compare_cmd.cpp	2008-12-17 10:33:27 UTC (rev 13763)
+++ cs/cigma/trunk/src/cli_compare_cmd.cpp	2008-12-17 10:33:29 UTC (rev 13764)
@@ -2,6 +2,7 @@
 #include "Common.h"
 #include "core_writers.h"
 
+#include <limits>
 #include <iostream>
 #include <iomanip>
 
@@ -53,7 +54,7 @@
         ("rule,r", po::value<string>(&rule), "Integration rule (points and weights)")
         ("rule-weights", po::value<string>(&qw), "...integration weights on reference cell")
         ("rule-points", po::value<string>(&qx), "...integration points on reference cell")
-        ("freq,f", po::value<int>(&(op.freq)), "Output frequency of timer")
+        ("timer-frequency,f", po::value<int>(&(op.freq)), "Output frequency of timer")
         ("threshold", po::value<double>(&threshold), "Threshold value for global residual")
         ;
 
@@ -104,7 +105,7 @@
 
     if (!vm.count("threshold"))
     {
-        threshold = 0;
+        threshold = std::numeric_limits<double>::infinity();
     }
     else
     {
@@ -167,11 +168,11 @@
     double L2 = op.residuals->L2();
     double max_residual = op.residuals->max();
 
-    if (threshold >= L2)
+    if (L2 > threshold)
     {
         if (op.verbose)
         {
-            cout << "Threshold " << threshold << " exceeded!" << endl;
+            cout << "Exceeding threshold " << threshold << endl;
         }
         status = 1;
     }



More information about the CIG-COMMITS mailing list