USER-DPD: pair_multi_lucy_rx bugfix for systems with multiple atom types

This commit is contained in:
Tim Mattox
2017-03-03 09:29:17 -05:00
parent 9a560b9091
commit 763a00e8b0

View File

@ -923,15 +923,15 @@ void PairMultiLucyRX::computeLocalDensity()
rho_i += factor;
if (newton_pair || j < nlocal)
rho[j] += factor;
} else if (rsq < cutsq[itype][jtype]) {
const double rcut = sqrt(cutsq[itype][jtype]);
const double tmpFactor = 1.0-sqrt(rsq)/rcut;
const double tmpFactor4 = tmpFactor*tmpFactor*tmpFactor*tmpFactor;
const double factor = (84.0/(5.0*pi*rcut*rcut*rcut))*(1.0+3.0*sqrt(rsq)/(2.0*rcut))*tmpFactor4;
rho_i += factor;
if (newton_pair || j < nlocal)
rho[j] += factor;
}
} else if (rsq < cutsq[itype][jtype]) {
const double rcut = sqrt(cutsq[itype][jtype]);
const double tmpFactor = 1.0-sqrt(rsq)/rcut;
const double tmpFactor4 = tmpFactor*tmpFactor*tmpFactor*tmpFactor;
const double factor = (84.0/(5.0*pi*rcut*rcut*rcut))*(1.0+3.0*sqrt(rsq)/(2.0*rcut))*tmpFactor4;
rho_i += factor;
if (newton_pair || j < nlocal)
rho[j] += factor;
}
}