Merge pull request #4182 from akohlmey/group-bitmap-accessor

Refactor code to use group bitmap accessor
This commit is contained in:
Axel Kohlmeyer
2025-03-25 14:12:27 -04:00
committed by GitHub
20 changed files with 89 additions and 77 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]);