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

Comparing trunk/src/parallel/ForceMatrixDecomposition.cpp (file contents):
Revision 1930 by gezelter, Mon Aug 19 13:51:04 2013 UTC vs.
Revision 1939 by gezelter, Thu Oct 31 18:18:57 2013 UTC

# Line 1179 | Line 1179 | namespace OpenMD {
1179      idat.atid1 = identsRow[atom1];
1180      idat.atid2 = identsCol[atom2];
1181  
1182 <    if (regionsRow[atom1] >= 0 && regionsCol[atom2] >= 0)
1182 >    if (regionsRow[atom1] >= 0 && regionsCol[atom2] >= 0) {
1183        idat.sameRegion = (regionsRow[atom1] == regionsCol[atom2]);
1184 <      
1184 >    } else {
1185 >      idat.sameRegion = false;
1186 >    }
1187 >
1188      if (storageLayout_ & DataStorage::dslAmat) {
1189        idat.A1 = &(atomRowData.aMat[atom1]);
1190        idat.A2 = &(atomColData.aMat[atom2]);
# Line 1238 | Line 1241 | namespace OpenMD {
1241      idat.atid1 = idents[atom1];
1242      idat.atid2 = idents[atom2];
1243  
1244 <    if (regions[atom1] >= 0 && regions[atom2] >= 0)
1244 >    if (regions[atom1] >= 0 && regions[atom2] >= 0) {
1245        idat.sameRegion = (regions[atom1] == regions[atom2]);
1246 +    } else {
1247 +      idat.sameRegion = false;
1248 +    }
1249  
1250      if (storageLayout_ & DataStorage::dslAmat) {
1251        idat.A1 = &(snap_->atomData.aMat[atom1]);
# Line 1386 | Line 1392 | namespace OpenMD {
1392      Vector3d boxY = box.getColumn(1);
1393      Vector3d boxZ = box.getColumn(2);
1394      
1395 <    nCells_.x() = (int) ( boxX.length() )/ rList_;
1396 <    nCells_.y() = (int) ( boxY.length() )/ rList_;
1397 <    nCells_.z() = (int) ( boxZ.length() )/ rList_;
1395 >    nCells_.x() = int( boxX.length() / rList_ );
1396 >    nCells_.y() = int( boxY.length() / rList_ );
1397 >    nCells_.z() = int( boxZ.length() / rList_ );
1398      
1399      // handle small boxes where the cell offsets can end up repeating cells
1400      
# Line 1484 | Line 1490 | namespace OpenMD {
1490          }
1491          
1492          // find xyz-indices of cell that cutoffGroup is in.
1493 <        whichCell.x() = nCells_.x() * scaled.x();
1494 <        whichCell.y() = nCells_.y() * scaled.y();
1495 <        whichCell.z() = nCells_.z() * scaled.z();
1493 >        whichCell.x() = int(nCells_.x() * scaled.x());
1494 >        whichCell.y() = int(nCells_.y() * scaled.y());
1495 >        whichCell.z() = int(nCells_.z() * scaled.z());
1496          
1497          // find single index of this cell:
1498          cellIndex = Vlinear(whichCell, nCells_);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines