correct bug and synchronize fix addforce respa level init with other fixes

This commit is contained in:
Axel Kohlmeyer 2016-09-27 17:36:02 -04:00
parent f9c2049724
commit 1adf3858a9
1 changed files with 4 additions and 7 deletions

View File

@ -203,13 +203,10 @@ void FixAddForce::init()
update->whichflag == 2 && estyle == NONE)
error->all(FLERR,"Must use variable energy with fix addforce");
int max_respa = 0;
if (strstr(update->integrate_style,"respa"))
max_respa = ((Respa *) update->integrate)->nlevels-1;
if (respa_level >= 0)
ilevel_respa = MIN(respa_level,max_respa);
if (strstr(update->integrate_style,"respa")) {
ilevel_respa = ((Respa *) update->integrate)->nlevels-1;
if (respa_level >= 0) ilevel_respa = MIN(respa_level,ilevel_respa);
}
}
/* ---------------------------------------------------------------------- */