--- trunk/src/parallel/ForceMatrixDecomposition.cpp 2015/03/03 16:40:39 2062 +++ 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 @@ -833,8 +833,8 @@ namespace OpenMD { #endif } - inline Vector3d ForceMatrixDecomposition::getIntergroupVector(int cg1, - int cg2){ + Vector3d ForceMatrixDecomposition::getIntergroupVector(int cg1, + int cg2){ Vector3d d; #ifdef IS_MPI @@ -913,8 +913,8 @@ namespace OpenMD { } - inline Vector3d ForceMatrixDecomposition::getInteratomicVector(int atom1, - int atom2){ + Vector3d ForceMatrixDecomposition::getInteratomicVector(int atom1, + int atom2){ Vector3d d; #ifdef IS_MPI @@ -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) {