use more precise detection of verlet and respa run styles

This commit is contained in:
Axel Kohlmeyer
2021-03-30 07:37:39 -04:00
parent 3041561383
commit 40f1a74a7f
2 changed files with 3 additions and 3 deletions

View File

@ -193,7 +193,7 @@ void FixAddForce::init()
update->whichflag == 2 && estyle == NONE)
error->all(FLERR,"Must use variable energy with fix addforce");
if (strstr(update->integrate_style,"respa")) {
if (utils::strmatch(update->integrate_style,"^respa")) {
ilevel_respa = ((Respa *) update->integrate)->nlevels-1;
if (respa_level >= 0) ilevel_respa = MIN(respa_level,ilevel_respa);
}
@ -203,7 +203,7 @@ void FixAddForce::init()
void FixAddForce::setup(int vflag)
{
if (strstr(update->integrate_style,"verlet"))
if (utils::strmatch(update->integrate_style,"^verlet"))
post_force(vflag);
else {
((Respa *) update->integrate)->copy_flevel_f(ilevel_respa);