forked from lijiext/lammps
git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@511 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
parent
8d2d6b68a3
commit
59cfd438ae
|
@ -21,8 +21,6 @@
|
||||||
|
|
||||||
using namespace LAMMPS_NS;
|
using namespace LAMMPS_NS;
|
||||||
|
|
||||||
enum{INDEX,LOOP,EQUAL,WORLD,UNIVERSE,ULOOP,ATOM}; // also in variable.cpp
|
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|
||||||
ComputeVariable::ComputeVariable(LAMMPS *lmp, int narg, char **arg) :
|
ComputeVariable::ComputeVariable(LAMMPS *lmp, int narg, char **arg) :
|
||||||
|
|
|
@ -21,8 +21,6 @@
|
||||||
|
|
||||||
using namespace LAMMPS_NS;
|
using namespace LAMMPS_NS;
|
||||||
|
|
||||||
enum{INDEX,LOOP,EQUAL,WORLD,UNIVERSE,ULOOP,ATOM}; // also in variable.cpp
|
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|
||||||
ComputeVariableAtom::ComputeVariableAtom(LAMMPS *lmp, int narg, char **arg) :
|
ComputeVariableAtom::ComputeVariableAtom(LAMMPS *lmp, int narg, char **arg) :
|
||||||
|
|
|
@ -307,6 +307,7 @@ int Variable::next(int narg, char **arg)
|
||||||
|
|
||||||
/* ----------------------------------------------------------------------
|
/* ----------------------------------------------------------------------
|
||||||
return ptr to the data text associated with a variable
|
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
|
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)
|
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();
|
ptree = new Tree();
|
||||||
double tmp = evaluate(data[ivar][0],ptree);
|
double tmp = evaluate(data[ivar][0],ptree);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue