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

This commit is contained in:
sjplimp
2016-07-01 22:39:26 +00:00
parent 29e64df1ba
commit d291fcb5d9
2 changed files with 6 additions and 3 deletions

View File

@ -195,9 +195,10 @@ void AtomVecBody::copy(int i, int j, int delflag)
// if deleting atom J via delflag and J has bonus data, then delete it // if deleting atom J via delflag and J has bonus data, then delete it
if (delflag && body[j] >= 0) { if (delflag && body[j] >= 0) {
icp->put(bonus[body[j]].iindex); int k = body[j];
dcp->put(bonus[body[j]].dindex); icp->put(bonus[k].iindex);
copy_bonus(nlocal_bonus-1,body[j]); dcp->put(bonus[k].dindex);
copy_bonus(nlocal_bonus-1,k);
nlocal_bonus--; nlocal_bonus--;
} }

View File

@ -148,8 +148,10 @@ class MyPoolChunk {
} }
// return indexed chunk to pool via free list // return indexed chunk to pool via free list
// index = -1 for no allocated chunk
void put(int index) { void put(int index) {
if (index < 0) return;
int ipage = index/chunkperpage; int ipage = index/chunkperpage;
int ibin = whichbin[ipage]; int ibin = whichbin[ipage];
nchunk--; nchunk--;