From bf8a9d07a7a3a979b8c348c84cb474e1a39cb80a Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sun, 16 Oct 2022 16:37:39 -0400 Subject: [PATCH] simplify --- src/input.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/input.cpp b/src/input.cpp index 4c88579dfc..dcce667af7 100644 --- a/src/input.cpp +++ b/src/input.cpp @@ -1499,7 +1499,7 @@ void Input::dihedral_style() void Input::dimension() { - if (narg != 1) error->all(FLERR,"Illegal dimension command: expected 1 argument but found {}", narg); + if (narg != 1) error->all(FLERR, "Dimension command expects exactly 1 argument"); if (domain->box_exist) error->all(FLERR,"Dimension command after simulation box is defined"); domain->dimension = utils::inumeric(FLERR,arg[0],false,lmp); @@ -1509,8 +1509,7 @@ void Input::dimension() // must reset default extra_dof of all computes // since some were created before dimension command is encountered - for (int i = 0; i < modify->ncompute; i++) - modify->compute[i]->reset_extra_dof(); + for (auto &c : modify->compute_list()) c->reset_extra_dof(); } /* ---------------------------------------------------------------------- */