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

This commit is contained in:
sjplimp
2014-05-09 15:27:08 +00:00
parent 1e871c456e
commit 425fad8f71
4 changed files with 144 additions and 9 deletions

View File

@ -730,11 +730,6 @@ void Modify::add_fix(int narg, char **arg, char *suffix)
if (fix[ifix] == NULL) error->all(FLERR,"Invalid fix style");
// set fix mask values and increment nfix (if new)
fmask[ifix] = fix[ifix]->setmask();
if (newflag) nfix++;
// check if Fix is in restart_global list
// if yes, pass state info to the Fix so it can reset itself
@ -766,6 +761,16 @@ void Modify::add_fix(int narg, char **arg, char *suffix)
if (logfile) fprintf(logfile,str,fix[ifix]->id,fix[ifix]->style);
}
}
// increment nfix (if new)
// set fix mask values
// post_construct() allows new fix to create other fixes
// nfix increment comes first so that recursive call to add_fix within
// post_constructor() will see updated nfix
if (newflag) nfix++;
fmask[ifix] = fix[ifix]->setmask();
fix[ifix]->post_constructor();
}
/* ----------------------------------------------------------------------