Commit 4fb963f0 authored by pscrozi's avatar pscrozi
Browse files

Fixed variable bound bugs that Arun Karthi pointed out.

git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@93 f3b2605a-c512-4ea7-a41b-209d697bcdaa
parent 0b9fe1a7
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -25,7 +25,7 @@
    math functions = add(x,y), sub(x,y), mult(x,y), div(x,y),
                     neg(x), pow(x,y), exp(x), ln(x), sqrt(x)
    group functions = mass(group), charge(group), xcm(group,dim),
                      vcm(group,dim), bounds(group,xmin), gyration(group)
                      vcm(group,dim), bound(group,xmin), gyration(group)
    vectors = x[5], y[12], z[17], vx[88], vy[19], vz[2],
              fx[1], fy[2005], fz[1]
    keywords = same keywords (mostly) as in <A HREF = "thermo_style.html">thermo_style custom</A> command
+1 −1
Original line number Diff line number Diff line
@@ -20,7 +20,7 @@ style = {index} or {loop} or {equal} or {world} or {universe} :l
    math functions = add(x,y), sub(x,y), mult(x,y), div(x,y),
                     neg(x), pow(x,y), exp(x), ln(x), sqrt(x)
    group functions = mass(group), charge(group), xcm(group,dim),
                      vcm(group,dim), bounds(group,xmin), gyration(group)
                      vcm(group,dim), bound(group,xmin), gyration(group)
    vectors = x\[5\], y\[12\], z\[17\], vx\[88\], vy\[19\], vz\[2\],
              fx\[1\], fy\[2005\], fz\[1\]
    keywords = same keywords (mostly) as in "thermo_style custom"_thermo_style.html command
+2 −2
Original line number Diff line number Diff line
@@ -569,9 +569,9 @@ char *Variable::evaluate(char *str)
      group->bounds(igroup,minmax);
      if (strcmp(arg2,"xmin") == 0) answer = minmax[0];
      else if (strcmp(arg2,"xmax") == 0) answer = minmax[1];
      if (strcmp(arg2,"ymin") == 0) answer = minmax[2];
      else if (strcmp(arg2,"ymin") == 0) answer = minmax[2];
      else if (strcmp(arg2,"ymax") == 0) answer = minmax[3];
      if (strcmp(arg2,"zmin") == 0) answer = minmax[4];
      else if (strcmp(arg2,"zmin") == 0) answer = minmax[4];
      else if (strcmp(arg2,"zmax") == 0) answer = minmax[5];
      else error->all("Cannot evaluate variable equal command");