ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE-2.0/src/applications/staticProps/GofRAngle.cpp
(Generate patch)

Comparing trunk/OOPSE-2.0/src/applications/staticProps/GofRAngle.cpp (file contents):
Revision 1994 by tim, Thu Feb 10 18:14:03 2005 UTC vs.
Revision 1995 by tim, Thu Feb 10 22:37:21 2005 UTC

# Line 70 | Line 70 | void GofRAngle::processHistogram() {
70  
71      double volume = info_->getSnapshotManager()->getCurrentSnapshot()->getVolume();
72      double pairDensity = npairs_ /volume;
73 <    double pairConstant = ( 4.0 * PI * pairDensity ) / 3.0;
73 >    double pairConstant = ( 4.0 * NumericConstant::PI * pairDensity ) / 3.0;
74  
75      for(int i = 0 ; i < histogram_.size(); ++i){
76  
# Line 103 | Line 103 | void GofRAngle::collectHistogram(StuntDouble* sd1, Stu
103      
104      double cosAngle = evaluateAngle(sd1, sd2);
105      double halfBin = (nAngleBins_ - 1) * 0.5;
106 <    int whichThetaBin = halfBin * (cosAngle + 1.0)
106 >    int whichThetaBin = halfBin * (cosAngle + 1.0);
107      ++histogram_[whichRBin][whichThetaBin];
108      
109      ++npairs_;
# Line 139 | Line 139 | double GofRTheta::evaluateAngle(StuntDouble* sd1, Stun
139      Vector3d r12 = pos1 - pos2;
140      currentSnapshot_->wrapVector(r12);
141      r12.normalize();
142 <    Vector3d dipole = sd1->getElectroFrame().getColumn(2)£»
142 >    Vector3d dipole = sd1->getElectroFrame().getColumn(2);
143      dipole.normalize();    
144 <    return dot();
144 >    return dot(r12, dipole);
145   }
146  
147   double GofROmega::evaluateAngle(StuntDouble* sd1, StuntDouble* sd2) {
148      Vector3d v1 = sd1->getElectroFrame().getColumn(2);
149      Vector3d v2 = sd1->getElectroFrame().getColumn(2);    
150 +    v1.normalize();
151 +    v2.normalize();
152 +    return dot(v1, v2);
153   }
154  
155  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines