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 3024 by gezelter, Tue Sep 26 14:33:56 2006 UTC vs.
Revision 3054 by gezelter, Wed Oct 18 21:58:48 2006 UTC

# Line 37 | Line 37
37   * arising out of the use of or inability to use software, even if the
38   * University of Notre Dame has been advised of the possibility of
39   * such damages.
40 + *
41 + *  BondOrderParameter.cpp
42 + *  OOPSE-4
43 + *
44 + *  Created by J. Daniel Gezelter on 09/26/06.
45 + *  @author  J. Daniel Gezelter
46 + *  @version $Id: BondOrderParameter.cpp,v 1.19 2006-10-18 21:58:47 gezelter Exp $
47 + *
48   */
41
42
43 /* Creates orientational bond order parameters as outlined by
44 *     Bond-orientaional order in liquids and glasses, Steinhart,Nelson,Ronchetti
45 *     Phys Rev B, 28,784,1983
46 *
47 */
49  
50   #include "applications/staticProps/BondOrderParameter.hpp"
51   #include "utils/simError.h"
# Line 118 | Line 119 | namespace oopse {
119          }
120        }
121      }
122 +    delete [] THRCOF;
123 +    THRCOF = NULL;
124    }
125    
126    BondOrderParameter::~BondOrderParameter() {
127      Q_histogram_.clear();
128      W_histogram_.clear();
129 +    for (int l = 0; l <= lMax_; l++) {
130 +      for (int m = -l; m <= l; m++) {
131 +        w3j[std::make_pair(l,m)].clear();
132 +      }
133 +    }
134 +    w3j.clear();
135 +    m2Min.clear();
136 +    m2Max.clear();
137    }
138 <
138 >  
139    void BondOrderParameter::initalizeHistogram() {
140      for (int bin = 0; bin < nBins_; bin++) {
141        for (int l = 0; l <= lMax_; l++) {
# Line 219 | Line 230 | namespace oopse {
230              if (atom->getGlobalIndex() != myIndex) {
231  
232                vec = sd->getPos() - atom->getPos();      
233 <              currentSnapshot_->wrapVector(vec);
233 >
234 >              if (usePeriodicBoundaryConditions_)
235 >                currentSnapshot_->wrapVector(vec);
236                
237                // Calculate "bonds" and build Q_lm(r) where
238                //      Q_lm = Y_lm(theta(r),phi(r))                
# Line 385 | Line 398 | namespace oopse {
398          RealType Qval = MinQ_ + (i + 0.5) * deltaQ_;              
399          osq << Qval;
400          for (int l = 0; l <= lMax_; l++) {
401 <          osq << "\t" << (RealType)Q_histogram_[std::make_pair(i,l)] / (RealType)Qcount_[l];
401 >          osq << "\t" << (RealType)Q_histogram_[std::make_pair(i,l)] /
402 >            (RealType)Qcount_[l];
403          }
404          osq << "\n";
405        }
# Line 413 | Line 427 | namespace oopse {
427          RealType Wval = MinW_ + (i + 0.5) * deltaW_;              
428          osw << Wval;
429          for (int l = 0; l <= lMax_; l++) {
430 <          osw << "\t" << (RealType)W_histogram_[std::make_pair(i,l)] / (RealType)Wcount_[l];
430 >          osw << "\t" << (RealType)W_histogram_[std::make_pair(i,l)] /
431 >            (RealType)Wcount_[l];
432          }
433          osw << "\n";
434        }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines