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

Comparing trunk/OOPSE-4/src/applications/staticProps/SCDOrderParameter.cpp (file contents):
Revision 2257 by tim, Mon Jun 13 18:25:30 2005 UTC vs.
Revision 2759 by tim, Wed May 17 21:51:42 2006 UTC

# Line 115 | Line 115 | double SCDElem::calcSCD(Snapshot* snapshot) {
115  
116   }
117  
118 < double SCDElem::calcSCD(Snapshot* snapshot) {
118 > RealType SCDElem::calcSCD(Snapshot* snapshot) {
119      std::vector<SDTuple3>::iterator i;
120      Vector3d normal(0.0, 0.0, 1.0);
121 <    double scd = 0.0;
121 >    RealType scd = 0.0;
122      for (i = tuples_.begin(); i != tuples_.end(); ++i) {        
123          //Egberts B. and Berendsen H.J.C, J.Chem.Phys. 89(6), 3718-3732, 1988
124          
# Line 132 | Line 132 | double SCDElem::calcSCD(Snapshot* snapshot) {
132          xAxis.normalize();
133          yAxis.normalize();
134          zAxis.normalize();
135 <        double cosThetaX = dot(xAxis, normal);
136 <        double sxx = 0.5*(3*cosThetaX * cosThetaX - 1.0);
137 <        double cosThetaY = dot(yAxis, normal);
138 <        double syy = 0.5*(3*cosThetaY * cosThetaY - 1.0);
135 >        RealType cosThetaX = dot(xAxis, normal);
136 >        RealType sxx = 0.5*(3*cosThetaX * cosThetaX - 1.0);
137 >        RealType cosThetaY = dot(yAxis, normal);
138 >        RealType syy = 0.5*(3*cosThetaY * cosThetaY - 1.0);
139          scd += 2.0/3.0*sxx + 1.0/3.0*syy;
140      }
141      scd /= tuples_.size();

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines