git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@8522 f3b2605a-c512-4ea7-a41b-209d697bcdaa

This commit is contained in:
pscrozi 2012-08-01 15:19:19 +00:00
parent c579294b09
commit ec87f00bff
1 changed files with 9 additions and 2 deletions

View File

@ -337,8 +337,15 @@ void FixGCMC::attempt_deletion()
ngas*exp(beta*deletion_energy)/(zz*volume)) {
avec->copy(atom->nlocal-1,i,1);
atom->nlocal--;
local_gas_list[iwhichlocal] = local_gas_list[ngas_local-1];
ngas_local--;
int *type = atom->type;
if ((type[i] == ntype) and (local_gas_list[ngas_local-1] == atom->nlocal)) {
ngas_local--;
} else {
ngas_local = 0;
for (int i = 0; i < atom->nlocal; i++)
if (type[i] == ntype)
local_gas_list[ngas_local++] = i;
}
success = 1;
}
}