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

Comparing trunk/src/optimization/Armijo.cpp (file contents):
Revision 1782 by gezelter, Wed Aug 22 02:28:28 2012 UTC vs.
Revision 1879 by gezelter, Sun Jun 16 15:15:42 2013 UTC

# Line 32 | Line 32 | namespace QuantLib {
32          Constraint& constraint = P.constraint();
33          succeed_=true;
34          bool maxIter = false;
35 <        RealType qtold, t = t_ini;
36 <        size_t loopNumber = 0;
35 >        RealType t = t_ini;
36 >
37          
38          RealType q0 = P.functionValue();
39          RealType qp0 = P.gradientNormValue();
# Line 51 | Line 51 | namespace QuantLib {
51          
52          // Enter in the loop if the criterion is not satisfied
53          if ((qt_-q0) > -alpha_*t*qpt_) {
54 +            RealType qtold;
55 +            size_t loopNumber = 0;
56              do {
57                  loopNumber++;
58                  // Decrease step

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines