bug fix for compute cluster/atom when computing values used to update a dynamic group

This commit is contained in:
Steven J. Plimpton
2018-08-08 09:31:16 -06:00
parent 985318203d
commit 9202896e75
4 changed files with 43 additions and 11 deletions

View File

@ -204,17 +204,22 @@ void FixGroup::set_group()
int nlocal = atom->nlocal;
// invoke atom-style variable if defined
// set post_integrate flag to 1, then unset after
// this is for any compute to check if it needs to
// operate differently due to invocation this early in timestep
// e.g. perform ghost comm update due to atoms having just moved
double *var = NULL;
int *ivector = NULL;
double *dvector = NULL;
if (varflag) {
update->post_integrate = 1;
modify->clearstep_compute();
memory->create(var,nlocal,"fix/group:varvalue");
input->variable->compute_atom(ivar,igroup,var,1,0);
modify->addstep_compute(update->ntimestep + nevery);
update->post_integrate = 0;
}
// invoke per-atom property if defined