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

@ -140,13 +140,10 @@ void Compute::modify_params(int narg, char **arg)
void Compute::adjust_dof_fix()
{
Fix **fix = modify->fix;
int nfix = modify->nfix;
fix_dof = 0;
for (int i = 0; i < nfix; i++)
if (fix[i]->dof_flag)
fix_dof += fix[i]->dof(igroup);
for (auto &ifix : modify->get_fix_list())
if (ifix->dof_flag)
fix_dof += ifix->dof(igroup);
}
/* ----------------------------------------------------------------------