fix bug when no other post_force fixes are defined

This commit is contained in:
Steve Plimpton
2022-04-22 17:10:56 -06:00
parent 0ece11c491
commit a90c632ae2
5 changed files with 33 additions and 22 deletions

View File

@ -372,7 +372,7 @@ void Respa::setup(int flag)
mesg += fmt::format(" {}:{}", ilevel + 1, step[ilevel]);
mesg += "\n r-RESPA fixes :";
for (int l = 0; l < modify->n_post_force_respa; ++l) {
for (int l = 0; l < modify->n_post_force_respa_any; ++l) {
Fix *f = modify->get_fix_by_index(modify->list_post_force_respa[l]);
if (f->respa_level >= 0)
mesg += fmt::format(" {}:{}[{}]", MIN(f->respa_level + 1, nlevels), f->style, f->id);
@ -704,7 +704,8 @@ void Respa::recurse(int ilevel)
timer->stamp(Timer::COMM);
}
timer->stamp();
if (modify->n_post_force_respa) modify->post_force_respa(vflag, ilevel, iloop);
if (modify->n_post_force_respa_any)
modify->post_force_respa(vflag, ilevel, iloop);
modify->final_integrate_respa(ilevel, iloop);
timer->stamp(Timer::MODIFY);
}