must set boxflag *after* checking for rigid fix because we might change the box ourselves

This commit is contained in:
Axel Kohlmeyer
2022-03-20 21:25:26 -04:00
parent 550ae15dff
commit 4c95314ea6
2 changed files with 2 additions and 2 deletions

View File

@ -713,9 +713,9 @@ void FixRigid::init()
bool boxflag = false;
for (auto ifix : modify->get_fix_list()) {
if (ifix->box_change) boxflag = true;
if (boxflag && utils::strmatch(ifix->style,"^rigid"))
error->all(FLERR,"Rigid fixes must come before any box changing fix");
if (ifix->box_change) boxflag = true;
}
// add gravity forces based on gravity vector from fix