Commit e969f7cd authored by sjplimp's avatar sjplimp
Browse files

git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@5552 f3b2605a-c512-4ea7-a41b-209d697bcdaa
parent 18b821f1
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1597,8 +1597,8 @@ double Variable::collapse_tree(Tree *tree)

  if (tree->type == SIN) {
    arg1 = collapse_tree(tree->left);
    tree->type = VALUE;
    if (tree->left->type != VALUE) return 0.0;
    tree->type = VALUE;
    tree->value = sin(arg1);
    return tree->value;
  }
+3 −3
Original line number Diff line number Diff line
@@ -356,21 +356,21 @@ void Velocity::set(int narg, char **arg)
    xstr = new char[n];
    strcpy(xstr,&arg[0][2]);
  } else if (strcmp(arg[0],"NULL") == 0) xstyle = NONE;
  else vx = xscale * atof(arg[0]);
  else vx = atof(arg[0]);

  if (strstr(arg[1],"v_") == arg[1]) {
    int n = strlen(&arg[1][2]) + 1;
    ystr = new char[n];
    strcpy(ystr,&arg[1][2]);
  } else if (strcmp(arg[1],"NULL") == 0) ystyle = NONE;
  else vy = yscale * atof(arg[1]);
  else vy = atof(arg[1]);

  if (strstr(arg[2],"v_") == arg[2]) {
    int n = strlen(&arg[2][2]) + 1;
    zstr = new char[n];
    strcpy(zstr,&arg[2][2]);
  } else if (strcmp(arg[2],"NULL") == 0) zstyle = NONE;
  else vz = zscale * atof(arg[2]);
  else vz = atof(arg[2]);

  // set and apply scale factors