forked from lijiext/lammps
Merge pull request #351 from timattox/USER-DPD_pair_exp6_bugfix
USER-DPD: Possible uninitialized variable in pair_exp6_rx.cpp bugfix.
This commit is contained in:
commit
a5ff35435a
|
@ -297,6 +297,13 @@ void PairExp6rx::compute(int eflag, int vflag)
|
||||||
rm21_ij = 0.5*(rm2_i + rm1_j);
|
rm21_ij = 0.5*(rm2_i + rm1_j);
|
||||||
epsilon21_ij = sqrt(epsilon2_i*epsilon1_j);
|
epsilon21_ij = sqrt(epsilon2_i*epsilon1_j);
|
||||||
|
|
||||||
|
evdwlOldEXP6_12 = 0.0;
|
||||||
|
evdwlOldEXP6_21 = 0.0;
|
||||||
|
evdwlEXP6_12 = 0.0;
|
||||||
|
evdwlEXP6_21 = 0.0;
|
||||||
|
fpairOldEXP6_12 = 0.0;
|
||||||
|
fpairOldEXP6_21 = 0.0;
|
||||||
|
|
||||||
if(rmOld12_ij!=0.0 && rmOld21_ij!=0.0){
|
if(rmOld12_ij!=0.0 && rmOld21_ij!=0.0){
|
||||||
if(alphaOld21_ij == 6.0 || alphaOld12_ij == 6.0)
|
if(alphaOld21_ij == 6.0 || alphaOld12_ij == 6.0)
|
||||||
error->all(FLERR,"alpha_ij is 6.0 in pair exp6");
|
error->all(FLERR,"alpha_ij is 6.0 in pair exp6");
|
||||||
|
@ -459,6 +466,7 @@ void PairExp6rx::compute(int eflag, int vflag)
|
||||||
} else {
|
} else {
|
||||||
evdwlEXP6_21 = buck1*(6.0*rexp - alpha21_ij*rm6ij*r6inv) - urc - durc*(r-rCut);
|
evdwlEXP6_21 = buck1*(6.0*rexp - alpha21_ij*rm6ij*r6inv) - urc - durc*(r-rCut);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Apply Mixing Rule to get the overall force for the CG pair
|
// Apply Mixing Rule to get the overall force for the CG pair
|
||||||
|
@ -488,7 +496,6 @@ void PairExp6rx::compute(int eflag, int vflag)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
if (vflag_fdotr) virial_fdotr_compute();
|
if (vflag_fdotr) virial_fdotr_compute();
|
||||||
|
|
||||||
// Release the local parameter data.
|
// Release the local parameter data.
|
||||||
|
|
Loading…
Reference in New Issue