ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/OpenMD/branches/development/src/applications/staticProps/GofRAngle.cpp
(Generate patch)

Comparing branches/development/src/applications/staticProps/GofRAngle.cpp (file contents):
Revision 1787 by gezelter, Wed Aug 29 18:13:11 2012 UTC vs.
Revision 1794 by gezelter, Thu Sep 6 19:44:06 2012 UTC

# Line 70 | Line 70 | namespace OpenMD {
70      }
71    }
72  
73 <  void GofRAngle::initalizeHistogram() {
73 >  void GofRAngle::initializeHistogram() {
74      npairs_ = 0;
75      for (unsigned int i = 0; i < histogram_.size(); ++i){
76        std::fill(histogram_[i].begin(), histogram_[i].end(), 0);
# Line 109 | Line 109 | namespace OpenMD {
109        currentSnapshot_->wrapVector(r12);
110  
111      RealType distance = r12.length();
112 <    int whichRBin = distance / deltaR_;
112 >    int whichRBin = int(distance / deltaR_);
113  
114      if (distance <= len_) {
115  
116        RealType cosAngle = evaluateAngle(sd1, sd2);
117        RealType halfBin = (nAngleBins_ - 1) * 0.5;
118 <      int whichThetaBin = halfBin * (cosAngle + 1.0);
118 >      int whichThetaBin = int(halfBin * (cosAngle + 1.0));
119        ++histogram_[whichRBin][whichThetaBin];
120          
121        ++npairs_;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines