make sure r3inv is initialized when lj and coul cutoff are different

This commit is contained in:
Axel Kohlmeyer 2019-04-27 14:51:37 -04:00
parent 5d9e85d840
commit 8102fdcf24
No known key found for this signature in database
GPG Key ID: D9B44E93BF0C375A
1 changed files with 2 additions and 2 deletions

View File

@ -584,8 +584,8 @@ void PairLJCharmmfswCoulLong::compute_outer(int eflag, int vflag)
if (rsq < cut_ljsq) {
evdwl = r6inv*(lj3[itype][jtype]*r6inv-lj4[itype][jtype]);
if (rsq > cut_lj_innersq) {
rinv = 1.0/r;
r3inv = rinv*rinv*rinv;
rinv = sqrt(r2inv);
r3inv = r2inv*rinv;
evdwl12 = lj3[itype][jtype]*cut_lj6*denom_lj12 *
(r6inv - cut_lj6inv)*(r6inv - cut_lj6inv);
evdwl6 = -lj4[itype][jtype]*cut_lj3*denom_lj6 *