must reset "eval_in_progress[]" flags to avoid bogus circular dependency errors

This commit is contained in:
Axel Kohlmeyer
2024-06-03 07:47:59 -04:00
parent 34a037ccfb
commit 118fa8e209
3 changed files with 13 additions and 0 deletions

View File

@ -888,6 +888,7 @@ void Input::clear()
lmp->destroy(); lmp->destroy();
lmp->create(); lmp->create();
lmp->post_create(); lmp->post_create();
variable->clear_in_progress();
} }
/* ---------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- */

View File

@ -879,6 +879,17 @@ void Variable::purge_atomfile()
if (style[i] == ATOMFILE) remove(i); if (style[i] == ATOMFILE) remove(i);
} }
/* ----------------------------------------------------------------------
called by "clear" command to reset all "in_progress" state variables
to avoid spurious "variable has circular dependency" issues
------------------------------------------------------------------------- */
void Variable::clear_in_progress()
{
for (int i = 0; i < nvar; ++i)
eval_in_progress[i] = 0;
}
/* ---------------------------------------------------------------------- /* ----------------------------------------------------------------------
called by python command in input script called by python command in input script
simply pass input script line args to Python class simply pass input script line args to Python class

View File

@ -35,6 +35,7 @@ class Variable : protected Pointers {
void set_arrays(int); void set_arrays(int);
void python_command(int, char **); void python_command(int, char **);
void purge_atomfile(); void purge_atomfile();
void clear_in_progress();
int equalstyle(int); int equalstyle(int);
int atomstyle(int); int atomstyle(int);