make bugfix compatible with using a variable for dump_modify every

This commit is contained in:
Axel Kohlmeyer
2022-08-31 17:16:26 -04:00
parent 673eeff581
commit 6a745f40ea

View File

@ -1067,14 +1067,15 @@ void Dump::modify_params(int narg, char **arg)
if (strstr(arg[iarg+1],"v_") == arg[iarg+1]) {
delete[] output->var_dump[idump];
output->var_dump[idump] = utils::strdup(&arg[iarg+1][2]);
output->last_dump[idump] = -1;
n = 0;
} else {
n = utils::inumeric(FLERR,arg[iarg+1],false,lmp);
if (n <= 0) error->all(FLERR, "Invalid dump_modify every argument: {}", n);
output->next_dump[idump] = (update->ntimestep/n)*n+n;
}
output->mode_dump[idump] = 0;
output->every_dump[idump] = n;
output->next_dump[idump] = (update->ntimestep/n)*n+n;
iarg += 2;
} else if (strcmp(arg[iarg],"every/time") == 0) {