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

Comparing trunk/OOPSE-4/src/applications/staticProps/BondOrderParameter.cpp (file contents):
Revision 3007 by gezelter, Tue Sep 19 21:14:11 2006 UTC vs.
Revision 3008 by gezelter, Tue Sep 19 21:20:15 2006 UTC

# Line 75 | Line 75 | namespace oopse {
75      rCut_ = rCut;
76      mSize_ = 2*lNumber_+1;    
77  
78 <    // Set the l for the spherical harmonic, it doesn't change
78 >    deltaQ_ = 1.0 / nbins;
79 >    deltaW_ = 2.0 / nbins;
80  
80    sphericalHarmonic.setL(lNumber_);
81
82    delta_Q = 1.0 / nbins;
83    delta_W = 2.0 / nbins;
84
81      Q_histogram_.resize(nbins);
82      W_histogram_.resize(nbins);
83  
# Line 111 | Line 107 | namespace oopse {
107      RealSphericalHarmonic sphericalHarmonic;
108      int i, j;
109    
110 <  
110 >    // Set the l for the spherical harmonic, it doesn't change
111 >    sphericalHarmonic.setL(lNumber_);
112 >
113 >
114      DumpReader reader(info_, dumpFilename_);    
115      int nFrames = reader.getNFrames();
116  
# Line 200 | Line 199 | namespace oopse {
199          double l_ = (double)lNumber_;
200          double m2Min, m2Max;
201          int error, m1, m2, m3;
202 <        
203 <        W_l_ = 0.0;
202 >
203 >        RealType W_l;
204 >        RealType W_l_hat;
205 >        W_l = 0.0;
206          for (int m1 = -lNumber_; m1 <= lNumber_; m1++) {
207            // Zero work array
208 <          for (int ii = 0; ii < mSize_; ii+){
208 >          for (int ii = 0; ii < mSize_; ii++){
209              THRCOF[i] = 0.0;
210            }
211            // Get Wigner coefficients
# Line 212 | Line 213 | namespace oopse {
213            for (int m_index = 1; i < (int)(m2Max - m2Min-1.0); m_index++) {
214              m2 = floor(m2Min) + m_index - 1;
215              m3 = -m1-m2;
216 <            W_l_ += THRCOF[m_index]*QBar_lm[m1+lNumber_]*QBar_lm[m2+lNumber_]*QBar_lm[m3+lNumber_];
216 >            W_l += THRCOF[m_index]*QBar_lm[m1+lNumber_]*QBar_lm[m2+lNumber_]*QBar_lm[m3+lNumber_];
217            }
218          }
219  
220 <        W_l_hat = W_l_ / pow(QSq_l, 1.5);
220 >        W_l_hat = W_l / pow(QSq_l, 1.5);
221  
222          // accumulate histogram data for Q_l and W_l_hat:
223  
# Line 260 | Line 261 | namespace oopse {
261  
262    void BondOrderParameter::collectHistogram(RealType Q_l, RealType W_l_hat) {
263  
264 <    if (Q_l < Max_Q) {
264 >    if (Q_l < MaxQ_) {
265        int whichBin = Q_l / deltaQ_;
266        Q_histogram_[whichBin] += 1;
267      }
268 <    if (W_l_hat < Max_W) {
268 >    if (W_l_hat < MaxW_) {
269        int whichBin = W_l_hat / deltaW_;
270        W_histogram_[whichBin] += 1;
271      }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines