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

@ -998,18 +998,11 @@ void Irregular::destroy_data()
void Irregular::init_exchange()
{
int nfix = modify->nfix;
Fix **fix = modify->fix;
int onefix;
int maxexchange_fix = 0;
for (int i = 0; i < nfix; i++) {
onefix = fix[i]->maxexchange;
maxexchange_fix = MAX(maxexchange_fix,onefix);
}
for (auto &ifix : modify->get_fix_list())
maxexchange_fix = MAX(maxexchange_fix, ifix->maxexchange);
int maxexchange = atom->avec->maxexchange + maxexchange_fix;
bufextra = maxexchange + BUFEXTRA;
bufextra = atom->avec->maxexchange + maxexchange_fix + BUFEXTRA;
}
/* ----------------------------------------------------------------------