ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/OpenMD/branches/development/src/rnemd/RNEMD.cpp
(Generate patch)

Comparing branches/development/src/rnemd/RNEMD.cpp (file contents):
Revision 1874 by gezelter, Wed May 15 15:09:35 2013 UTC vs.
Revision 1875 by gezelter, Fri May 17 14:41:42 2013 UTC

# Line 1597 | Line 1597 | namespace OpenMD {
1597  
1598      Vector3d ac, acrec, bc, bcrec;
1599      Vector3d ah, ahrec, bh, bhrec;
1600    RealType cNumerator, cDenominator;
1601    RealType hNumerator, hDenominator;
1600  
1603
1601      bool successfulExchange = false;
1602      if ((Mh > 0.0) && (Mc > 0.0)) {//both slabs are not empty
1603        Vector3d vc = Pc / Mc;
# Line 1614 | Line 1611 | namespace OpenMD {
1611        bc  = -(Ici * angularMomentumTarget_) + omegac;
1612        bcrec = bc - omegac;
1613        
1614 <      cNumerator = Kc - kineticTarget_;
1614 >      RealType cNumerator = Kc - kineticTarget_;
1615        if (doLinearPart)
1616          cNumerator -= 0.5 * Mc * ac.lengthSquare();
1617        
# Line 1623 | Line 1620 | namespace OpenMD {
1620  
1621        if (cNumerator > 0.0) {
1622          
1623 <        cDenominator = Kc;
1623 >        RealType cDenominator = Kc;
1624  
1625          if (doLinearPart)
1626            cDenominator -= 0.5 * Mc * vc.lengthSquare();
# Line 1646 | Line 1643 | namespace OpenMD {
1643              bh  = (Ihi * angularMomentumTarget_) + omegah;
1644              bhrec = bh - omegah;
1645              
1646 <            hNumerator = Kh + kineticTarget_;
1646 >            RealType hNumerator = Kh + kineticTarget_;
1647              if (doLinearPart)
1648                hNumerator -= 0.5 * Mh * ah.lengthSquare();
1649              
# Line 1655 | Line 1652 | namespace OpenMD {
1652                
1653              if (hNumerator > 0.0) {
1654                
1655 <              hDenominator = Kh;
1655 >              RealType hDenominator = Kh;
1656                if (doLinearPart)
1657                  hDenominator -= 0.5 * Mh * vh.lengthSquare();
1658                if (doAngularPart)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines