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

This commit is contained in:
sjplimp
2009-08-06 22:21:38 +00:00
parent f3ddb773fd
commit 6fbcee59ee
9 changed files with 134 additions and 28 deletions

View File

@ -1369,6 +1369,27 @@ void Atom::update_callback(int ifix)
if (extra_restart[i] > ifix) extra_restart[i]--;
}
/* ----------------------------------------------------------------------
return a pointer to a named internal variable
if don't recognize name, return NULL
------------------------------------------------------------------------- */
void *Atom::extract(char *name)
{
if (strcmp(name,"natoms") == 0) return (void *) &natoms;
if (strcmp(name,"nlocal") == 0) return (void *) &nlocal;
if (strcmp(name,"id") == 0) return (void *) tag;
if (strcmp(name,"type") == 0) return (void *) type;
if (strcmp(name,"x") == 0) return (void *) x;
if (strcmp(name,"v") == 0) return (void *) v;
if (strcmp(name,"f") == 0) return (void *) f;
if (strcmp(name,"mass") == 0) return (void *) mass;
if (strcmp(name,"rmass") == 0) return (void *) rmass;
return NULL;
}
/* ----------------------------------------------------------------------
return # of bytes of allocated memory
call to avec sums per-atom vectors