From 082254455b4ada187abdcae743e9986ab0481fa4 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 7 Apr 2022 00:29:54 -0400 Subject: [PATCH] improve confusing error messages --- src/POEMS/fix_poems.cpp | 4 +++- src/RIGID/fix_rigid.cpp | 3 ++- src/RIGID/fix_rigid_small.cpp | 3 ++- src/modify.cpp | 4 ++-- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/POEMS/fix_poems.cpp b/src/POEMS/fix_poems.cpp index d2df9b0159..7ac3570f2f 100644 --- a/src/POEMS/fix_poems.cpp +++ b/src/POEMS/fix_poems.cpp @@ -356,7 +356,9 @@ void FixPOEMS::init() for (auto ifix : modify->get_fix_list()) { if (utils::strmatch(ifix->style, "^poems")) pflag = true; if (pflag && (ifix->setmask() & POST_FORCE) && !ifix->rigid_flag) - if (comm->me == 0) error->warning(FLERR, "Fix {} alters forces after fix poems", ifix->id); + if (comm->me == 0) + error->warning(FLERR,"Fix {} with ID {} alters forces after fix poems", + ifix->style, ifix->id); } } diff --git a/src/RIGID/fix_rigid.cpp b/src/RIGID/fix_rigid.cpp index 6b211d05bf..780dbd66f5 100644 --- a/src/RIGID/fix_rigid.cpp +++ b/src/RIGID/fix_rigid.cpp @@ -693,7 +693,8 @@ void FixRigid::init() for (auto ifix : modify->get_fix_list()) { if (ifix->rigid_flag) rflag = true; if ((comm->me == 0) && rflag && (ifix->setmask() & POST_FORCE) && !ifix->rigid_flag) - error->warning(FLERR,"Fix {} alters forces after fix rigid", ifix->id); + error->warning(FLERR,"Fix {} with ID {} alters forces after fix rigid", + ifix->style, ifix->id); } } diff --git a/src/RIGID/fix_rigid_small.cpp b/src/RIGID/fix_rigid_small.cpp index 5c524c832b..45aadd845f 100644 --- a/src/RIGID/fix_rigid_small.cpp +++ b/src/RIGID/fix_rigid_small.cpp @@ -538,7 +538,8 @@ void FixRigidSmall::init() for (auto ifix : modify->get_fix_list()) { if (ifix->rigid_flag) rflag = true; if ((comm->me == 0) && rflag && (ifix->setmask() & POST_FORCE) && !ifix->rigid_flag) - error->warning(FLERR,"Fix {} alters forces after fix rigid", ifix->id); + error->warning(FLERR,"Fix {} with ID {} alters forces after fix rigid/small", + ifix->style, ifix->id); } } diff --git a/src/modify.cpp b/src/modify.cpp index 7c6f8e4ae3..7554079e2a 100644 --- a/src/modify.cpp +++ b/src/modify.cpp @@ -249,11 +249,11 @@ void Modify::init() for (i = 0; i < nfix; i++) if (!fix[i]->dynamic_group_allow && group->dynamic[fix[i]->igroup]) - error->all(FLERR, "Fix {} does not allow use with a dynamic group", fix[i]->id); + error->all(FLERR, "Fix {} does not allow use with a dynamic group", fix[i]->style); for (i = 0; i < ncompute; i++) if (!compute[i]->dynamic_group_allow && group->dynamic[compute[i]->igroup]) - error->all(FLERR, "Compute {} does not allow use with a dynamic group", compute[i]->id); + error->all(FLERR, "Compute {} does not allow use with a dynamic group", compute[i]->style); // warn if any particle is time integrated more than once