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

Comparing trunk/src/constraints/Rattle.cpp (file contents):
Revision 2021 by gezelter, Fri Apr 18 20:07:09 2014 UTC vs.
Revision 2022 by gezelter, Fri Sep 26 22:22:28 2014 UTC

# Line 223 | Line 223 | namespace OpenMD {
223      RealType rabsq = consPair->getConsDistSquare();
224      RealType diffsq = rabsq - pabsq;
225  
226 +
227      // the original rattle code from alan tidesley
228      if (fabs(diffsq) > (consTolerance_ * rabsq * 2)){
229      
230        Vector3d oldPosA = consElem1->getPrevPos();
231        Vector3d oldPosB = consElem2->getPrevPos();      
232  
233 <      Vector3d rab = oldPosA - oldPosB;    
233 >      Vector3d rab = oldPosA - oldPosB;          
234  
235        currentSnapshot_->wrapVector(rab);
236  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines