use new bitmap accessor function and simplify code

This commit is contained in:
Axel Kohlmeyer
2024-06-01 17:57:31 -04:00
parent 5f2c81804d
commit a0939c4fcc
11 changed files with 23 additions and 50 deletions

View File

@ -48,11 +48,11 @@ Compute::Compute(LAMMPS *lmp, int narg, char **arg) :
id = utils::strdup(arg[0]);
if (!utils::is_id(id))
error->all(FLERR,"Compute ID must be alphanumeric or underscore characters");
error->all(FLERR,"Compute ID {} must only have alphanumeric or underscore characters", id);
groupbit = group->get_bitmask_by_id(FLERR, arg[1], fmt::format("compute {}", arg[2]));
igroup = group->find(arg[1]);
if (igroup == -1) error->all(FLERR,"Could not find compute group ID");
groupbit = group->bitmask[igroup];
if (igroup == -1) error->all(FLERR,"Could not find compute group ID {}", arg[1]);
style = utils::strdup(arg[2]);