--- trunk/src/parallel/ForceMatrixDecomposition.cpp 2013/08/19 13:12:00 1929 +++ trunk/src/parallel/ForceMatrixDecomposition.cpp 2013/10/31 18:18:57 1939 @@ -1175,16 +1175,16 @@ namespace OpenMD { idat.excluded = excludeAtomPair(atom1, atom2); #ifdef IS_MPI - idat.atypes = make_pair( atypesRow[atom1], atypesCol[atom2]); + //idat.atypes = make_pair( atypesRow[atom1], atypesCol[atom2]); idat.atid1 = identsRow[atom1]; idat.atid2 = identsCol[atom2]; - if (regionsRow[atom1] >= 0 && regionsCol[atom2] >= 0) + if (regionsRow[atom1] >= 0 && regionsCol[atom2] >= 0) { idat.sameRegion = (regionsRow[atom1] == regionsCol[atom2]); - - //idat.atypes = make_pair( ff_->getAtomType(identsRow[atom1]), - // ff_->getAtomType(identsCol[atom2]) ); - + } else { + idat.sameRegion = false; + } + if (storageLayout_ & DataStorage::dslAmat) { idat.A1 = &(atomRowData.aMat[atom1]); idat.A2 = &(atomColData.aMat[atom2]); @@ -1237,12 +1237,15 @@ namespace OpenMD { #else - idat.atypes = make_pair( atypesLocal[atom1], atypesLocal[atom2]); + //idat.atypes = make_pair( atypesLocal[atom1], atypesLocal[atom2]); idat.atid1 = idents[atom1]; idat.atid2 = idents[atom2]; - if (regions[atom1] >= 0 && regions[atom2] >= 0) + if (regions[atom1] >= 0 && regions[atom2] >= 0) { idat.sameRegion = (regions[atom1] == regions[atom2]); + } else { + idat.sameRegion = false; + } if (storageLayout_ & DataStorage::dslAmat) { idat.A1 = &(snap_->atomData.aMat[atom1]); @@ -1389,9 +1392,9 @@ namespace OpenMD { Vector3d boxY = box.getColumn(1); Vector3d boxZ = box.getColumn(2); - nCells_.x() = (int) ( boxX.length() )/ rList_; - nCells_.y() = (int) ( boxY.length() )/ rList_; - nCells_.z() = (int) ( boxZ.length() )/ rList_; + nCells_.x() = int( boxX.length() / rList_ ); + nCells_.y() = int( boxY.length() / rList_ ); + nCells_.z() = int( boxZ.length() / rList_ ); // handle small boxes where the cell offsets can end up repeating cells @@ -1487,9 +1490,9 @@ namespace OpenMD { } // find xyz-indices of cell that cutoffGroup is in. - whichCell.x() = nCells_.x() * scaled.x(); - whichCell.y() = nCells_.y() * scaled.y(); - whichCell.z() = nCells_.z() * scaled.z(); + whichCell.x() = int(nCells_.x() * scaled.x()); + whichCell.y() = int(nCells_.y() * scaled.y()); + whichCell.z() = int(nCells_.z() * scaled.z()); // find single index of this cell: cellIndex = Vlinear(whichCell, nCells_);