diff --git a/src/compute_variable.cpp b/src/compute_variable.cpp index 0acfd27e4f..edde51dddb 100644 --- a/src/compute_variable.cpp +++ b/src/compute_variable.cpp @@ -21,8 +21,6 @@ using namespace LAMMPS_NS; -enum{INDEX,LOOP,EQUAL,WORLD,UNIVERSE,ULOOP,ATOM}; // also in variable.cpp - /* ---------------------------------------------------------------------- */ ComputeVariable::ComputeVariable(LAMMPS *lmp, int narg, char **arg) : diff --git a/src/compute_variable_atom.cpp b/src/compute_variable_atom.cpp index 46457b6b0c..1ff5ca11b3 100644 --- a/src/compute_variable_atom.cpp +++ b/src/compute_variable_atom.cpp @@ -21,8 +21,6 @@ using namespace LAMMPS_NS; -enum{INDEX,LOOP,EQUAL,WORLD,UNIVERSE,ULOOP,ATOM}; // also in variable.cpp - /* ---------------------------------------------------------------------- */ ComputeVariableAtom::ComputeVariableAtom(LAMMPS *lmp, int narg, char **arg) : diff --git a/src/variable.cpp b/src/variable.cpp index cca6d31046..d2afda384c 100644 --- a/src/variable.cpp +++ b/src/variable.cpp @@ -307,6 +307,7 @@ int Variable::next(int narg, char **arg) /* ---------------------------------------------------------------------- return ptr to the data text associated with a variable + if EQUAL var, evaluates variable and puts result in str return NULL if no variable or index is bad, caller must respond ------------------------------------------------------------------------- */ @@ -829,7 +830,8 @@ double Variable::evaluate(char *str, Tree *tree) void Variable::build_parse_tree(int ivar) { - if (style[ivar] != ATOM) error->all(""); + if (style[ivar] != ATOM) + error->all("Cannot build parse tree for non atom style variable"); ptree = new Tree(); double tmp = evaluate(data[ivar][0],ptree); }