--- trunk/src/applications/sequentialProps/ContactAngle2.cpp 2014/11/04 15:31:51 2035 +++ trunk/src/applications/sequentialProps/ContactAngle2.cpp 2014/11/04 16:20:31 2036 @@ -138,17 +138,20 @@ namespace OpenMD { } } - for (unsigned int i = 0; i < histo.size(); ++i) { - RealType ther = dr * (i + 0.5); - for(unsigned int j = 0; j < histo[i].size(); ++j) { - if (histo[i][j] <= threshDens_) { - RealType thez = dz * (j + 0.5); - cerr << ther << "\t" << thez << "\n"; - break; + for (unsigned int j = 0; j < nZBins_; ++j) { + RealType thez = dz * (j + 0.5); + bool aboveThresh = false; + for (unsigned int i = 0; i < nRBins_; ++i) { + RealType ther = dr * (i + 0.5); + if (histo[i][j] >= threshDens_) aboveThresh = true; + + if (aboveThresh && (histo[i][j] <= threshDens_)) { + cerr << thez << "\t" << ther << "\n"; + break; } } } - + // values_.push_back( acos(maxct)*(180.0/M_PI) ); }