git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@3009 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
21
src/atom.cpp
21
src/atom.cpp
@ -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
|
||||
|
||||
Reference in New Issue
Block a user