git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@15089 f3b2605a-c512-4ea7-a41b-209d697bcdaa

This commit is contained in:
sjplimp
2016-05-31 16:50:28 +00:00
parent 17e44d1313
commit 414c1b011f

View File

@ -36,7 +36,7 @@ FixMomentum::FixMomentum(LAMMPS *lmp, int narg, char **arg) :
nevery = force->inumeric(FLERR,arg[3]);
if (nevery <= 0) error->all(FLERR,"Illegal fix momentum command");
linear = angular = rescale = 0;
dynamic = linear = angular = rescale = 0;
int iarg = 4;
while (iarg < narg) {
@ -65,12 +65,6 @@ FixMomentum::FixMomentum(LAMMPS *lmp, int narg, char **arg) :
error->all(FLERR,"Illegal fix momentum command");
dynamic_group_allow = 1;
if (group->dynamic[igroup]) {
dynamic = 1;
} else {
if (group->count(igroup) == 0)
error->all(FLERR,"Fix momentum group has no atoms");
}
}
/* ---------------------------------------------------------------------- */
@ -86,6 +80,13 @@ int FixMomentum::setmask()
void FixMomentum::init()
{
if (group->dynamic[igroup]) {
dynamic = 1;
} else {
if (group->count(igroup) == 0)
error->all(FLERR,"Fix momentum group has no atoms");
}
masstotal = group->mass(igroup);
}