From b7272bbbf7bdfae3004a096cad7d0e8e1330e300 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 23 Apr 2021 16:32:39 -0400 Subject: [PATCH] restore variable declaration --- src/KSPACE/pair_buck_long_coul_long.cpp | 6 +++--- src/variable.cpp | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/KSPACE/pair_buck_long_coul_long.cpp b/src/KSPACE/pair_buck_long_coul_long.cpp index fa5b624462..8e8cf21da6 100644 --- a/src/KSPACE/pair_buck_long_coul_long.cpp +++ b/src/KSPACE/pair_buck_long_coul_long.cpp @@ -548,10 +548,10 @@ void PairBuckLongCoulLong::compute(int eflag, int vflag) r*expr*buck1i[typej]-g8*(((6.0*a2+6.0)*a2+3.0)*a2+1.0)*x2*rsq; if (eflag) evdwl = expr*buckai[typej]-g6*((a2+1.0)*a2+0.5)*x2; } else { // special case - double f = special_lj[ni], t = rn*(1.0-f); - force_buck = f*r*expr*buck1i[typej]- + double fc = special_lj[ni], t = rn*(1.0-fc); + force_buck = fc*r*expr*buck1i[typej]- g8*(((6.0*a2+6.0)*a2+3.0)*a2+1.0)*x2*rsq+t*buck2i[typej]; - if (eflag) evdwl = f*expr*buckai[typej] - + if (eflag) evdwl = fc*expr*buckai[typej] - g6*((a2+1.0)*a2+0.5)*x2+t*buckci[typej]; } } else { //table real space diff --git a/src/variable.cpp b/src/variable.cpp index dc9a2dbee5..9fe3fdcd12 100644 --- a/src/variable.cpp +++ b/src/variable.cpp @@ -1894,7 +1894,7 @@ double Variable::evaluate(char *str, Tree **tree, int ivar) } else if (strncmp(word,"v_",2) == 0) { - ivar = find(word+2); + int ivar = find(word+2); if (ivar < 0) print_var_error(FLERR,fmt::format("Invalid variable reference " "{} in variable formula",word),ivar);