Fixed issue with switching function derivative in PairAIREBO::FLJ

Since we compute dvdw as d vdw / d rij, we have to also compute
dslw as d slw / d rij. Currently, we compute -1/r d slw/d rij,
which leads to incorrect results when the two are later combined.
Alternatively, one could also modify dvdw to be -1/r d vdw/d rij,
which would be a more standard way to do LJ calculations, but this
way seems more consistent.
This commit is contained in:
Markus Hoehnerbach 2017-02-15 16:38:13 +01:00
parent fc3505fac4
commit 904609a7a3
1 changed files with 1 additions and 1 deletions

View File

@ -753,7 +753,7 @@ void PairAIREBO::FLJ(int eflag, int vflag)
tee = drij / swidth;
tee2 = tee*tee;
slw = 1.0 - tee2 * (3.0 - 2.0 * tee);
dslw = 6.0 * tee * (1.0 - tee) / rij / swidth;
dslw = -6.0 * tee * (1.0 - tee) / swidth;
} else {
slw = 1.0;
dslw = 0.0;