add extract to fix_group

this will allow users to define groups that are by default created internally by fixes, etc.
This commit is contained in:
jrgissing
2018-04-24 22:53:54 -06:00
parent 69665c218a
commit c4373c7afa
2 changed files with 12 additions and 5 deletions

View File

@ -251,3 +251,13 @@ void FixGroup::set_group()
if (varflag) memory->destroy(var);
}
/* ---------------------------------------------------------------------- */
void *FixGroup::extract(const char *str, int &unused)
{
if (strcmp(str,"property") == 0 && propflag) return (void *) idprop;
if (strcmp(str,"variable") == 0 && varflag) return (void *) idvar;
if (strcmp(str,"region") == 0 && regionflag) return (void *) idregion;
return NULL;
}