use accessor function to get and process list of fixes

This commit is contained in:
Axel Kohlmeyer
2022-03-16 14:18:09 -04:00
parent 4be3da727a
commit 7e2fef096f
6 changed files with 31 additions and 53 deletions

View File

@ -4756,10 +4756,8 @@ int lammps_has_id(void *handle, const char *category, const char *name) {
if (strcmp(name,dump[i]->id) == 0) return 1;
}
} else if (strcmp(category,"fix") == 0) {
int nfix = lmp->modify->nfix;
Fix **fix = lmp->modify->fix;
for (int i=0; i < nfix; ++i) {
if (strcmp(name,fix[i]->id) == 0) return 1;
for (auto &ifix : lmp->modify->get_fix_list()) {
if (strcmp(name,ifix->id) == 0) return 1;
}
} else if (strcmp(category,"group") == 0) {
int ngroup = lmp->group->ngroup;