git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@3009 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
@ -996,6 +996,42 @@ void Modify::list_init_compute()
|
||||
if (compute[i]->timeflag) list_timeflag[n_timeflag++] = i;
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
return a pointer to a named internal variable owned by fix ID
|
||||
if don't recognize ID, return NULL
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
void *Modify::extract_fix(char *id, char *name)
|
||||
{
|
||||
int ifix = find_fix(id);
|
||||
if (ifix < 0) return NULL;
|
||||
|
||||
if (strcmp(name,"index") == 0) {
|
||||
index_permanent = ifix;
|
||||
return (void *) &index_permanent;
|
||||
}
|
||||
|
||||
return fix[ifix]->extract(name);
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
return a pointer to a named internal variable owned by compute ID
|
||||
if don't recognize ID, return NULL
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
void *Modify::extract_compute(char *id, char *name)
|
||||
{
|
||||
int icompute = find_compute(id);
|
||||
if (icompute < 0) return NULL;
|
||||
|
||||
if (strcmp(name,"index") == 0) {
|
||||
index_permanent = icompute;
|
||||
return (void *) &index_permanent;
|
||||
}
|
||||
|
||||
return compute[icompute]->extract(name);
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
return # of bytes of allocated memory from all fixes
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
Reference in New Issue
Block a user