apply test for overlap with rigid bodies to set and velocity command

This commit is contained in:
Axel Kohlmeyer
2017-06-05 13:06:53 -04:00
parent 95d6f05a76
commit 968de8548c
2 changed files with 28 additions and 0 deletions

View File

@ -68,6 +68,12 @@ void Velocity::command(int narg, char **arg)
if (igroup == -1) error->all(FLERR,"Could not find velocity group ID");
groupbit = group->bitmask[igroup];
// check if velocities of atoms in rigid bodies are updated
if (modify->check_rigid_group_overlap(groupbit))
error->warning(FLERR,"Changing velocities of atoms in rigid bodies. "
"This has no effect unless rigid bodies are rebuild");
// identify style
if (strcmp(arg[1],"create") == 0) style = CREATE;