bond/react:unfix_deletes_internal_groups

This commit is contained in:
jrgissing 2019-03-13 21:55:17 -06:00
parent 5556567e91
commit 5608f87c15
2 changed files with 16 additions and 2 deletions

View File

@ -385,6 +385,10 @@ No parameter of this fix can be used with the {start/stop} keywords of
the "run"_run.html command. This fix is not invoked during "energy
minimization"_minimize.html.
When fix bond/react is 'unfixed,' all internally-created groups are
deleted. Therefore, fix bond/react can only be unfixed after unfixing
all other fixes that use any group created by fix bond/react.
[Restrictions:]
This fix is part of the USER-MISC package. It is only enabled if

View File

@ -457,8 +457,6 @@ FixBondReact::~FixBondReact()
memory->destroy(global_mega_glove);
if (stabilization_flag == 1) {
delete [] exclude_group;
// check nfix in case all fixes have already been deleted
if (id_fix1 && modify->nfix) modify->delete_fix(id_fix1);
delete [] id_fix1;
@ -473,6 +471,18 @@ FixBondReact::~FixBondReact()
delete [] statted_id;
delete [] guess_branch;
delete [] pioneer_count;
char **newarg;
newarg = new char*[2];
newarg[0] = master_group;
newarg[1] = (char *) "delete";
group->assign(2,newarg);
if (stabilization_flag == 1) {
newarg[0] = exclude_group;
group->assign(2,newarg);
delete [] exclude_group;
}
delete [] newarg;
}
/* ---------------------------------------------------------------------- */