ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/OpenMD/trunk/src/optimization/EndCriteria.cpp
(Generate patch)

Comparing trunk/src/optimization/EndCriteria.cpp (file contents):
Revision 1790 by gezelter, Thu Aug 30 17:18:22 2012 UTC vs.
Revision 1981 by gezelter, Mon Apr 14 18:32:51 2014 UTC

# Line 24 | Line 24
24   #include <cmath>
25   #include <cstdio>
26  
27 +
28   namespace QuantLib {
29      
30      EndCriteria::EndCriteria(size_t maxIterations,
# Line 143 | Line 144 | namespace QuantLib {
144              checkStationaryFunctionValue(fold, fnew, statStateIterations, ecType) ||
145              checkStationaryFunctionAccuracy(fnew, positiveOptimization, ecType) ||
146              checkZeroGradientNorm(normgnew, ecType);
147 +            sprintf(painCave.errMsg,
148 +                    "\n\tOptimization: Current iteration Count: ( %lu )\n",
149 +                    (unsigned long)iteration);
150 +            painCave.isFatal = 0;
151 +            painCave.severity = OPENMD_INFO;
152 +            simError();
153      }
154      
155      // Inspectors
# Line 183 | Line 190 | namespace QuantLib {
190          case QuantLib::EndCriteria::Unknown:
191              return out << "Unknown";
192          default:
193 <            sprintf(painCave.errMsg, "Unknown EndCriteria::Type ( %d )\n",
193 >            sprintf(painCave.errMsg, "unknown EndCriteria::Type ( %d )\n",
194                      int(ec));
195              painCave.isFatal = 1;
196              painCave.severity = OPENMD_ERROR;
197              simError();
191            return out << "Unknown EndCriteria::Type";
198          }
199 +        return out;
200      }
201  
202   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines