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

Comparing trunk/src/nonbonded/MAW.cpp (file contents):
Revision 1929 by gezelter, Mon Jul 1 21:09:37 2013 UTC vs.
Revision 1930 by gezelter, Mon Aug 19 13:51:04 2013 UTC

# Line 123 | Line 123 | namespace OpenMD {
123      mixer.Re = Re;
124      mixer.ca1 = ca1;
125      mixer.cb1 = cb1;
126 +    mixer.j_is_Metal = atype2->isMetal();
127  
128      int mtid1 = MAWtids[atype1->getIdent()];
129      int mtid2 = MAWtids[atype2->getIdent()];
# Line 134 | Line 135 | namespace OpenMD {
135      MixingMap[mtid1][mtid2] = mixer;
136      if (mtid2 != mtid1) {
137        MixingMap[mtid2].resize(nM);
138 +      mixer.j_is_Metal = atype1->isMetal();
139        MixingMap[mtid2][mtid1] = mixer;
140      }    
141    }
# Line 153 | Line 155 | namespace OpenMD {
155      RealType R_e = mixer.Re;
156      RealType beta = mixer.beta;
157      RealType ca1 = mixer.ca1;
158 <    RealType cb1 = mixer.cb1;
157 <    
158 <    bool j_is_Metal = idat.atypes.second->isMetal();
158 >    RealType cb1 = mixer.cb1;  
159      
160      Vector3d r;
161      RotMat3x3d Atrans;
162 <    if (j_is_Metal) {
162 >    if (mixer.j_is_Metal) {
163        // rotate the inter-particle separation into the two different
164        // body-fixed coordinate systems:
165        r = *(idat.A1) * *(idat.d);
# Line 257 | Line 257 | namespace OpenMD {
257      
258      // go back to lab frame using transpose of rotation matrix:
259      
260 <    if (j_is_Metal) {
260 >    if (mixer.j_is_Metal) {
261        *(idat.t1) += Atrans * trq;
262      } else {
263        *(idat.t2) += Atrans * trq;
# Line 269 | Line 269 | namespace OpenMD {
269      
270      // rotate the terms back into the lab frame:
271      Vector3d flab;
272 <    if (j_is_Metal) {
272 >    if (mixer.j_is_Metal) {
273        flab = Atrans * ftmp;
274      } else {
275        flab = - Atrans * ftmp;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines