git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@10328 f3b2605a-c512-4ea7-a41b-209d697bcdaa

This commit is contained in:
sjplimp
2013-07-24 21:01:12 +00:00
parent 6755d5b44f
commit cccc6475d9
4 changed files with 14 additions and 18 deletions

View File

@ -3234,7 +3234,7 @@ int Variable::special_function(char *word, char *contents, Tree **tree,
newtree->left = newtree->middle = newtree->right = NULL;
treestack[ntreestack++] = newtree;
// special function for file-style or atomfile-stlye variables
// special function for file-style or atomfile-style variables
} else if (strcmp(word,"next") == 0) {
if (narg != 1)
@ -3260,16 +3260,14 @@ int Variable::special_function(char *word, char *contents, Tree **tree,
treestack[ntreestack++] = newtree;
} else argstack[nargstack++] = value;
// ATOMFILE has one value per atom, only valid for
// save values in tree
// ATOMFILE has per-atom values, save values in tree
// copy current per-atom values into result so can read next ones
// set selfalloc = 1 so result will be deleted by free_tree() after eval
} else if (style[ivar] == ATOMFILE) {
if (tree == NULL)
error->all(FLERR,"Atomfile variable in equal-style variable formula");
// copy current per-atom values into result so can read next ones
// set selfalloc = 1 so will be deleted by free_tree() after eval
double *result;
memory->create(result,atom->nlocal,"variable:result");
memcpy(result,reader[ivar]->fix->vstore,atom->nlocal*sizeof(double));