Commit 5608f87c authored by jrgissing's avatar jrgissing
Browse files

bond/react:unfix_deletes_internal_groups

parent 5556567e
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -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
+12 −2
Original line number Diff line number Diff line
@@ -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;
}

/* ---------------------------------------------------------------------- */