use new bitmap accessor function and simplify code
This commit is contained in:
@ -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]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user