delay part of the variable.cpp refactoring until we have better unit testing for it.
This commit is contained in:
@ -563,9 +563,9 @@ void PairBuckLongCoulLong::compute(int eflag, int vflag)
|
||||
force_buck = r*expr*buck1i[typej]-(fdisptable[disp_k]+f_disp*dfdisptable[disp_k])*buckci[typej];
|
||||
if (eflag) evdwl = expr*buckai[typej]-(edisptable[disp_k]+f_disp*dedisptable[disp_k])*buckci[typej];
|
||||
} else { //special case
|
||||
double f = special_lj[ni], t = rn*(1.0-f);
|
||||
force_buck = f*r*expr*buck1i[typej] -(fdisptable[disp_k]+f_disp*dfdisptable[disp_k])*buckci[typej] +t*buck2i[typej];
|
||||
if (eflag) evdwl = f*expr*buckai[typej] -(edisptable[disp_k]+f_disp*dedisptable[disp_k])*buckci[typej]+t*buckci[typej];
|
||||
double fc = special_lj[ni], t = rn*(1.0-fc);
|
||||
force_buck = fc*r*expr*buck1i[typej] -(fdisptable[disp_k]+f_disp*dfdisptable[disp_k])*buckci[typej] +t*buck2i[typej];
|
||||
if (eflag) evdwl = fc*expr*buckai[typej] -(edisptable[disp_k]+f_disp*dedisptable[disp_k])*buckci[typej]+t*buckci[typej];
|
||||
}
|
||||
}
|
||||
} else { // cut
|
||||
@ -574,10 +574,10 @@ void PairBuckLongCoulLong::compute(int eflag, int vflag)
|
||||
if (eflag) evdwl = expr*buckai[typej] -
|
||||
rn*buckci[typej]-offseti[typej];
|
||||
} else { // special case
|
||||
double f = special_lj[ni];
|
||||
force_buck = f*(r*expr*buck1i[typej]-rn*buck2i[typej]);
|
||||
double fc = special_lj[ni];
|
||||
force_buck = fc*(r*expr*buck1i[typej]-rn*buck2i[typej]);
|
||||
if (eflag)
|
||||
evdwl = f*(expr*buckai[typej]-rn*buckci[typej]-offseti[typej]);
|
||||
evdwl = fc*(expr*buckai[typej]-rn*buckci[typej]-offseti[typej]);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -586,10 +586,10 @@ void PairBuckLongCoulLong::compute(int eflag, int vflag)
|
||||
fpair = (force_coul+force_buck)*r2inv;
|
||||
|
||||
if (newton_pair || j < nlocal) {
|
||||
double *fj = f0+(j+(j<<1)), f;
|
||||
fi[0] += f = d[0]*fpair; fj[0] -= f;
|
||||
fi[1] += f = d[1]*fpair; fj[1] -= f;
|
||||
fi[2] += f = d[2]*fpair; fj[2] -= f;
|
||||
double *fj = f0+(j+(j<<1)), fp;
|
||||
fi[0] += fp = d[0]*fpair; fj[0] -= fp;
|
||||
fi[1] += fp = d[1]*fpair; fj[1] -= fp;
|
||||
fi[2] += fp = d[2]*fpair; fj[2] -= fp;
|
||||
}
|
||||
else {
|
||||
fi[0] += d[0]*fpair;
|
||||
|
||||
@ -4109,7 +4109,7 @@ int Variable::special_function(char *word, char *contents, Tree **tree,
|
||||
Fix *fix = nullptr;
|
||||
int index,nvec,nstride;
|
||||
char *ptr1,*ptr2;
|
||||
ivar = -1;
|
||||
int ivar = -1;
|
||||
|
||||
// argument is compute
|
||||
|
||||
@ -4387,7 +4387,7 @@ int Variable::special_function(char *word, char *contents, Tree **tree,
|
||||
if (narg != 1)
|
||||
print_var_error(FLERR,"Invalid special function in variable formula",ivar);
|
||||
|
||||
ivar = find(args[0]);
|
||||
int ivar = find(args[0]);
|
||||
if (ivar < 0) {
|
||||
std::string mesg = "Variable ID '";
|
||||
mesg += args[0];
|
||||
@ -4399,7 +4399,7 @@ int Variable::special_function(char *word, char *contents, Tree **tree,
|
||||
// save value in tree or on argstack
|
||||
|
||||
if (style[ivar] == SCALARFILE) {
|
||||
value = atof(data[ivar][0]);
|
||||
double value = atof(data[ivar][0]);
|
||||
int done = reader[ivar]->read_scalar(data[ivar][0]);
|
||||
if (done) remove(ivar);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user