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 1876 by gezelter, Fri May 17 17:10:11 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;
1602
1600  
1601      bool successfulExchange = false;
1602      if ((Mh > 0.0) && (Mc > 0.0)) {//both slabs are not empty
# 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)
# Line 1740 | Line 1737 | namespace OpenMD {
1737             sd = seleManA_.nextSelected(isd)) {
1738          aSites.push_back(sd);
1739        }
1740 + #if defined(HAVE_QHULL)
1741        ConvexHull* surfaceMeshA = new ConvexHull();
1742        surfaceMeshA->computeHull(aSites);
1743        areaA = surfaceMeshA->getArea();
1744        delete surfaceMeshA;
1745 + #else
1746 +      sprintf( painCave.errMsg,
1747 +               "RNEMD::getDividingArea : Hull calculation is not possible\n"
1748 +               "\twithout libqhull. Please rebuild OpenMD with qhull enabled.");
1749 +      painCave.severity = OPENMD_ERROR;
1750 +      painCave.isFatal = 1;
1751 +      simError();
1752 + #endif
1753  
1754      } else {
1755        if (usePeriodicBoundaryConditions_) {
# Line 1758 | Line 1764 | namespace OpenMD {
1764        }
1765      }
1766  
1761
1762
1767      if (hasSelectionB_) {
1768        int isd;
1769        StuntDouble* sd;
# Line 1769 | Line 1773 | namespace OpenMD {
1773             sd = seleManB_.nextSelected(isd)) {
1774          bSites.push_back(sd);
1775        }
1776 +
1777 + #if defined(HAVE_QHULL)
1778        ConvexHull* surfaceMeshB = new ConvexHull();    
1779        surfaceMeshB->computeHull(bSites);
1780        areaB = surfaceMeshB->getArea();
1781        delete surfaceMeshB;
1782 + #else
1783 +      sprintf( painCave.errMsg,
1784 +               "RNEMD::getDividingArea : Hull calculation is not possible\n"
1785 +               "\twithout libqhull. Please rebuild OpenMD with qhull enabled.");
1786 +      painCave.severity = OPENMD_ERROR;
1787 +      painCave.isFatal = 1;
1788 +      simError();
1789 + #endif
1790  
1791 +
1792      } else {
1793        if (usePeriodicBoundaryConditions_) {
1794          // in periodic boundaries, the surface area is twice the x-y

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines