This commit is contained in:
Axel Kohlmeyer
2022-10-16 16:37:39 -04:00
parent 46a72f685c
commit bf8a9d07a7

View File

@ -1499,7 +1499,7 @@ void Input::dihedral_style()
void Input::dimension() 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) if (domain->box_exist)
error->all(FLERR,"Dimension command after simulation box is defined"); error->all(FLERR,"Dimension command after simulation box is defined");
domain->dimension = utils::inumeric(FLERR,arg[0],false,lmp); domain->dimension = utils::inumeric(FLERR,arg[0],false,lmp);
@ -1509,8 +1509,7 @@ void Input::dimension()
// must reset default extra_dof of all computes // must reset default extra_dof of all computes
// since some were created before dimension command is encountered // since some were created before dimension command is encountered
for (int i = 0; i < modify->ncompute; i++) for (auto &c : modify->compute_list()) c->reset_extra_dof();
modify->compute[i]->reset_extra_dof();
} }
/* ---------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- */