USER-DPD: pair_multi_lucy_rx bugfix for systems with multiple atom types
This commit is contained in:
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user