From 4c95314ea6aee5ce3aa6cec7a07009f20631f9f6 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sun, 20 Mar 2022 21:25:26 -0400 Subject: [PATCH] must set boxflag *after* checking for rigid fix because we might change the box ourselves --- src/RIGID/fix_rigid.cpp | 2 +- src/RIGID/fix_rigid_small.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/RIGID/fix_rigid.cpp b/src/RIGID/fix_rigid.cpp index 6809d31da1..6b211d05bf 100644 --- a/src/RIGID/fix_rigid.cpp +++ b/src/RIGID/fix_rigid.cpp @@ -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 diff --git a/src/RIGID/fix_rigid_small.cpp b/src/RIGID/fix_rigid_small.cpp index afeeeda2c4..5c524c832b 100644 --- a/src/RIGID/fix_rigid_small.cpp +++ b/src/RIGID/fix_rigid_small.cpp @@ -558,9 +558,9 @@ void FixRigidSmall::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