ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/branches/new_design/OOPSE-3.0/src/minimizers/CGFamilyMinimizer.cpp
(Generate patch)

Comparing branches/new_design/OOPSE-3.0/src/minimizers/CGFamilyMinimizer.cpp (file contents):
Revision 1899 by tim, Tue Dec 14 19:08:44 2004 UTC vs.
Revision 1900 by tim, Tue Jan 4 22:18:06 2005 UTC

# Line 1 | Line 1
1   #include <cmath>
2  
3 < #include "minimizers/OOPSEMinimizer.hpp"
3 > #include "minimizers/CGFamilyMinimizer.hpp"
4 > #include "primitives/Molecule.hpp"
5   #include "utils/Utility.hpp"
6  
7 < CGFamilyMinmizer::CGFamilyMinmizer(SimInfo *theInfo
7 <                                                               MinimizerParameterSet * param)
8 <                         :OOPSEMinimizer(theInfo, param){
9 <  prevG.resize(ndim);
10 <  prevX.resize(ndim);
11 <  direction.resize(ndim);
7 > namespace oopse {
8  
9 <  stepSize = paramSet->getStepSize();
9 > CGFamilyMinimizer::CGFamilyMinimizer(SimInfo *info) : OOPSEMinimizer(info){
10 >    prevG.resize(ndim);
11 >    prevX.resize(ndim);
12 >    direction.resize(ndim);
13  
14 +    stepSize = paramSet->getStepSize();
15   }
16 < int CGFamilyMinmizer::checkConvg(){
16 >
17 > int CGFamilyMinimizer::checkConvg(){
18    double fTol;
19    double relativeFTol;  // relative tolerance
20    double deltaF;
# Line 30 | Line 31 | int CGFamilyMinmizer::checkConvg(){
31    if (fabs(deltaF) <= relativeFTol) {
32  
33      if (bVerbose){
34 <      cout << "function value tolerance test passed" << std::endl;
35 <      cout << "ftol = " << fTol
34 >      std::cout << "function value tolerance test passed" << std::endl;
35 >      std::cout << "ftol = " << fTol
36               << "\tdeltaf = " << deltaF<< std::endl;
37      }
38      return CONVG_FTOL;
# Line 53 | Line 54 | int CGFamilyMinmizer::checkConvg(){
54   #endif
55  
56    if (gnorm <= relativeGTol) {
57 <      cout << "gradient tolerance test" << std::endl;
58 <      cout << "gnorm = " << gnorm
57 >      std::cout << "gradient tolerance test" << std::endl;
58 >      std::cout << "gnorm = " << gnorm
59               << "\trelativeGTol = " << relativeGTol<< std::endl;
60      return CONVG_GTOL;
61    }
# Line 62 | Line 63 | int CGFamilyMinmizer::checkConvg(){
63    //absolute gradient tolerance test
64  
65    if (gnorm <= gTol) {
66 <      cout << "absolute gradient tolerance test" << std::endl;
67 <      cout << "gnorm = " << gnorm
66 >      std::cout << "absolute gradient tolerance test" << std::endl;
67 >      std::cout << "gnorm = " << gnorm
68               << "\tgTol = " << gTol<< std::endl;
69      return CONVG_ABSGTOL;
70    }
# Line 72 | Line 73 | int CGFamilyMinmizer::checkConvg(){
73    return CONVG_UNCONVG;
74   }
75  
76 + }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines