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 |
|
|
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 |
|
} |