Merge pull request #1366 from jrgissing/bond/react-delete_internal_groups
Bond/react: unfixing deletes internal groups
This commit is contained in:
@ -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
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
Reference in New Issue
Block a user