--- trunk/src/parallel/ForceMatrixDecomposition.cpp 2015/03/03 17:02:20 2064 +++ trunk/src/parallel/ForceMatrixDecomposition.cpp 2015/03/09 17:10:26 2077 @@ -686,12 +686,12 @@ namespace OpenMD { AtomPlanPotRow->scatter(pot_row, pot_temp); AtomPlanPotRow->scatter(expot_row, expot_temp); - for (int ii = 0; ii < pot_temp.size(); ii++ ) + for (std::size_t ii = 0; ii < pot_temp.size(); ii++ ) pairwisePot += pot_temp[ii]; - for (int ii = 0; ii < expot_temp.size(); ii++ ) + for (std::size_t ii = 0; ii < expot_temp.size(); ii++ ) excludedPot += expot_temp[ii]; - + if (storageLayout_ & DataStorage::dslParticlePot) { // This is the pairwise contribution to the particle pot. The // embedding contribution is added in each of the low level @@ -714,12 +714,12 @@ namespace OpenMD { AtomPlanPotColumn->scatter(pot_col, pot_temp); AtomPlanPotColumn->scatter(expot_col, expot_temp); - for (int ii = 0; ii < pot_temp.size(); ii++ ) + for (std::size_t ii = 0; ii < pot_temp.size(); ii++ ) pairwisePot += pot_temp[ii]; - for (int ii = 0; ii < expot_temp.size(); ii++ ) + for (std::size_t ii = 0; ii < expot_temp.size(); ii++ ) excludedPot += expot_temp[ii]; - + if (storageLayout_ & DataStorage::dslParticlePot) { // This is the pairwise contribution to the particle pot. The // embedding contribution is added in each of the low level @@ -1508,13 +1508,10 @@ 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: - int m1 = Vlinear(whichCell, nCells_); - for (vector::iterator os = cellOffsets_.begin(); os != cellOffsets_.end(); ++os) {