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 2071 by gezelter, Sat Mar 7 21:41:51 2015 UTC

# Line 54 | Line 54 | namespace OpenMD {
54    ContactAngle1::ContactAngle1(SimInfo* info, const std::string& filename,
55                                 const std::string& sele, RealType solidZ,
56                                 RealType dropletRadius)
57 <    : SequentialAnalyzer(info, filename), selectionScript_(sele),
58 <      evaluator_(info), seleMan_(info), solidZ_(solidZ),
59 <      dropletRadius_(dropletRadius)  {
57 >  : SequentialAnalyzer(info, filename), solidZ_(solidZ),
58 >    dropletRadius_(dropletRadius), selectionScript_(sele),
59 >    seleMan_(info), evaluator_(info) {
60      
61      setOutputName(getPrefix(filename) + ".ca1");
62      
# 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