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 1873 by gezelter, Tue Apr 30 15:56:54 2013 UTC vs.
Revision 1874 by gezelter, Wed May 15 15:09:35 2013 UTC

# Line 72 | Line 72 | namespace OpenMD {
72                                  evaluatorA_(info), seleManA_(info),
73                                  commonA_(info), evaluatorB_(info),
74                                  seleManB_(info), commonB_(info),
75 <                                hasData_(false),
75 >                                hasData_(false), hasDividingArea_(false),
76                                  usePeriodicBoundaryConditions_(info->getSimParams()->getUsePeriodicBoundaryConditions()) {
77  
78      trialCount_ = 0;
# Line 1151 | Line 1151 | namespace OpenMD {
1151            //if w is in the right range, so should be x, y, z.
1152            vector<StuntDouble*>::iterator sdi;
1153            Vector3d vel;
1154 <          for (sdi = coldBin.begin(); sdi != coldBin.end(); sdi++) {
1154 >          for (sdi = coldBin.begin(); sdi != coldBin.end(); ++sdi) {
1155              if (rnemdFluxType_ == rnemdFullKE) {
1156                vel = (*sdi)->getVel() * c;
1157                (*sdi)->setVel(vel);
# Line 1162 | Line 1162 | namespace OpenMD {
1162              }
1163            }
1164            w = sqrt(w);
1165 <          for (sdi = hotBin.begin(); sdi != hotBin.end(); sdi++) {
1165 >          for (sdi = hotBin.begin(); sdi != hotBin.end(); ++sdi) {
1166              if (rnemdFluxType_ == rnemdFullKE) {
1167                vel = (*sdi)->getVel();
1168                vel.x() *= x;
# Line 1281 | Line 1281 | namespace OpenMD {
1281        vector<RealType>::iterator ri;
1282        RealType r1, r2, alpha0;
1283        vector<pair<RealType,RealType> > rps;
1284 <      for (ri = realRoots.begin(); ri !=realRoots.end(); ri++) {
1284 >      for (ri = realRoots.begin(); ri !=realRoots.end(); ++ri) {
1285          r2 = *ri;
1286          //check if FindRealRoots() give the right answer
1287          if ( fabs(u0 + r2 * (u1 + r2 * (u2 + r2 * (u3 + r2 * u4)))) > 1e-6 ) {
# Line 1313 | Line 1313 | namespace OpenMD {
1313          RealType diff;
1314          pair<RealType,RealType> bestPair = make_pair(1.0, 1.0);
1315          vector<pair<RealType,RealType> >::iterator rpi;
1316 <        for (rpi = rps.begin(); rpi != rps.end(); rpi++) {
1316 >        for (rpi = rps.begin(); rpi != rps.end(); ++rpi) {
1317            r1 = (*rpi).first;
1318            r2 = (*rpi).second;
1319            switch(rnemdFluxType_) {
# Line 1380 | Line 1380 | namespace OpenMD {
1380          }
1381          vector<StuntDouble*>::iterator sdi;
1382          Vector3d vel;
1383 <        for (sdi = coldBin.begin(); sdi != coldBin.end(); sdi++) {
1383 >        for (sdi = coldBin.begin(); sdi != coldBin.end(); ++sdi) {
1384            vel = (*sdi)->getVel();
1385            vel.x() *= x;
1386            vel.y() *= y;
# Line 1391 | Line 1391 | namespace OpenMD {
1391          x = 1.0 + px * (1.0 - x);
1392          y = 1.0 + py * (1.0 - y);
1393          z = 1.0 + pz * (1.0 - z);
1394 <        for (sdi = hotBin.begin(); sdi != hotBin.end(); sdi++) {
1394 >        for (sdi = hotBin.begin(); sdi != hotBin.end(); ++sdi) {
1395            vel = (*sdi)->getVel();
1396            vel.x() *= x;
1397            vel.y() *= y;
# Line 1669 | Line 1669 | namespace OpenMD {
1669                    Vector3d vel;
1670                    Vector3d rPos;
1671                    
1672 <                  for (sdi = coldBin.begin(); sdi != coldBin.end(); sdi++) {
1672 >                  for (sdi = coldBin.begin(); sdi != coldBin.end(); ++sdi) {
1673                      //vel = (*sdi)->getVel();
1674                      rPos = (*sdi)->getPos() - coordinateOrigin_;
1675                      if (doLinearPart)
# Line 1685 | Line 1685 | namespace OpenMD {
1685                        }
1686                      }
1687                    }
1688 <                  for (sdi = hotBin.begin(); sdi != hotBin.end(); sdi++) {
1688 >                  for (sdi = hotBin.begin(); sdi != hotBin.end(); ++sdi) {
1689                      //vel = (*sdi)->getVel();
1690                      rPos = (*sdi)->getPos() - coordinateOrigin_;
1691                      if (doLinearPart)
# Line 2231 | Line 2231 | namespace OpenMD {
2231        rnemdFile_ << "\t" << s;
2232      } else{
2233        sprintf( painCave.errMsg,
2234 <               "RNEMD detected a numerical error writing: %s for bin %d",
2234 >               "RNEMD detected a numerical error writing: %s for bin %u",
2235                 data_[index].title.c_str(), bin);
2236        painCave.isFatal = 1;
2237        simError();
# Line 2254 | Line 2254 | namespace OpenMD {
2254          isinf(s[1]) || isnan(s[1]) ||
2255          isinf(s[2]) || isnan(s[2]) ) {      
2256        sprintf( painCave.errMsg,
2257 <               "RNEMD detected a numerical error writing: %s for bin %d",
2257 >               "RNEMD detected a numerical error writing: %s for bin %u",
2258                 data_[index].title.c_str(), bin);
2259        painCave.isFatal = 1;
2260        simError();
# Line 2279 | Line 2279 | namespace OpenMD {
2279        rnemdFile_ << "\t" << s;
2280      } else{
2281        sprintf( painCave.errMsg,
2282 <               "RNEMD detected a numerical error writing: %s std. dev. for bin %d",
2282 >               "RNEMD detected a numerical error writing: %s std. dev. for bin %u",
2283                 data_[index].title.c_str(), bin);
2284        painCave.isFatal = 1;
2285        simError();
# Line 2301 | Line 2301 | namespace OpenMD {
2301          isinf(s[1]) || isnan(s[1]) ||
2302          isinf(s[2]) || isnan(s[2]) ) {      
2303        sprintf( painCave.errMsg,
2304 <               "RNEMD detected a numerical error writing: %s std. dev. for bin %d",
2304 >               "RNEMD detected a numerical error writing: %s std. dev. for bin %u",
2305                 data_[index].title.c_str(), bin);
2306        painCave.isFatal = 1;
2307        simError();

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines