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

Comparing trunk/src/applications/sequentialProps/ContactAngle1.cpp (file contents):
Revision 2029 by gezelter, Thu Oct 30 18:51:38 2014 UTC vs.
Revision 2030 by gezelter, Thu Oct 30 20:50:53 2014 UTC

# Line 121 | Line 121 | namespace OpenMD {
121        vector<RealType> realRoots = poly.FindRealRoots();
122  
123        RealType ct;
124      std::cerr << "nRealRoots = " << realRoots.size() << "\n";
124        
125        vector<RealType>::iterator ri;
126 <      vector<pair<RealType,RealType> > rps;
126 >
127 >
128 >      RealType maxct = -1.0;
129        for (ri = realRoots.begin(); ri !=realRoots.end(); ++ri) {
130          ct = *ri;
131          if (ct > 1.0)  ct = 1.0;
132          if (ct < -1.0) ct = -1.0;
133 +
134 +        // use the largest magnitude of ct that it finds:
135 +        if (ct > maxct) {
136 +          maxct = ct;
137 +        }                  
138        }
139        
140 <      values_.push_back( acos(ct)*(180.0/M_PI) );
140 >      values_.push_back( acos(maxct)*(180.0/M_PI) );
141      }
142    }    
143   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines