51 |
|
#include "math/Eigenvalue.hpp" |
52 |
|
|
53 |
|
namespace OpenMD { |
54 |
< |
|
54 |
> |
|
55 |
|
ContactAngle2::ContactAngle2(SimInfo* info, const std::string& filename, |
56 |
|
const std::string& sele, RealType solidZ, |
57 |
|
RealType threshDens, RealType bufferLength, |
58 |
|
int nrbins, int nzbins) |
59 |
< |
: SequentialAnalyzer(info, filename), selectionScript_(sele), |
60 |
< |
evaluator_(info), seleMan_(info), solidZ_(solidZ), |
61 |
< |
threshDens_(threshDens), bufferLength_(bufferLength), |
62 |
< |
nRBins_(nrbins), nZBins_(nzbins) { |
63 |
< |
|
59 |
> |
: SequentialAnalyzer(info, filename), solidZ_(solidZ), |
60 |
> |
threshDens_(threshDens), bufferLength_(bufferLength), nRBins_(nrbins), |
61 |
> |
nZBins_(nzbins), selectionScript_(sele), seleMan_(info), |
62 |
> |
evaluator_(info) { |
63 |
> |
|
64 |
|
setOutputName(getPrefix(filename) + ".ca2"); |
65 |
|
|
66 |
|
evaluator_.loadScriptString(sele); |
125 |
|
int whichRBin = int(r / dr); |
126 |
|
int whichZBin = int( (zLen/2.0 + z) / dz); |
127 |
|
|
128 |
< |
if ((whichRBin < nRBins_) && (whichZBin >= 0) && (whichZBin < nZBins_)) |
128 |
> |
if ((whichRBin < int(nRBins_)) && (whichZBin >= 0) && (whichZBin < int(nZBins_))) { |
129 |
|
histo[whichRBin][whichZBin] += sd->getMass(); |
130 |
+ |
} |
131 |
|
|
132 |
|
} |
133 |
|
|
157 |
|
bool foundThresh = false; |
158 |
|
int rloc = 0; |
159 |
|
|
160 |
< |
for (unsigned int i = 0; i < nRBins_; ++i) { |
161 |
< |
RealType ther = dr * (i + 0.5); |
160 |
> |
for (std::size_t i = 0; i < nRBins_; ++i) { |
161 |
> |
|
162 |
|
if (histo[i][j] >= threshDens_) aboveThresh = true; |
163 |
|
|
164 |
|
if (aboveThresh && (histo[i][j] <= threshDens_)) { |
252 |
|
center[1] = -((RealType)0.5)*coeff[2]; |
253 |
|
RealType radius = sqrt(fabs(center[0]*center[0] + center[1]*center[1] |
254 |
|
- coeff[0])); |
254 |
– |
RealType ev0 = fabs(evals[0]); |
255 |
|
|
256 |
|
int i1; |
257 |
|
for (i1 = 0; i1 < 100; ++i1) { |