ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/OpenMD/trunk/src/integrators/DLM.cpp
(Generate patch)

Comparing trunk/src/integrators/DLM.cpp (file contents):
Revision 1697 by skuang, Fri Mar 16 21:17:36 2012 UTC vs.
Revision 1879 by gezelter, Sun Jun 16 15:15:42 2013 UTC

# Line 35 | Line 35
35   *                                                                      
36   * [1]  Meineke, et al., J. Comp. Chem. 26, 252-271 (2005).            
37   * [2]  Fennell & Gezelter, J. Chem. Phys. 124, 234104 (2006).          
38 < * [3]  Sun, Lin & Gezelter, J. Chem. Phys. 128, 24107 (2008).          
39 < * [4]  Vardeman & Gezelter, in progress (2009).                        
38 > * [3]  Sun, Lin & Gezelter, J. Chem. Phys. 128, 234107 (2008).          
39 > * [4]  Kuang & Gezelter,  J. Chem. Phys. 133, 164101 (2010).
40 > * [5]  Vardeman, Stocker & Gezelter, J. Chem. Theory Comput. 7, 834 (2011).
41   */
42  
43   #include "DLM.hpp"
# Line 77 | Line 78 | namespace OpenMD {
78  
79        // rotate about the z-axis
80        angle = dt * ji[2] / I(2, 2);
80      sd->addZangle(angle);
81        rotateStep( 0, 1, angle, ji, A);
82  
83        // rotate about the y-axis
# Line 108 | Line 108 | namespace OpenMD {
108      RotMat3x3d rot = RotMat3x3d::identity(); // initalize rot as a unit matrix
109  
110      // use a small angle aproximation for sin and cosine
111 <    /*
111 >    
112      angleSqr = angle * angle;
113      angleSqrOver4 = angleSqr / 4.0;
114      top = 1.0 - angleSqrOver4;
# Line 116 | Line 116 | namespace OpenMD {
116  
117      cosAngle = top / bottom;
118      sinAngle = angle / bottom;
119 <    */
119 >    
120      // or don't use the small angle approximation:
121 <    cosAngle = cos(angle);
122 <    sinAngle = sin(angle);
121 >    //cosAngle = cos(angle);
122 >    //sinAngle = sin(angle);
123  
124      rot(axes1, axes1) = cosAngle;
125      rot(axes2, axes2) = cosAngle;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines