small changes to recent PR to standardize with other npair styles

This commit is contained in:
Steven J Plimpton
2018-01-16 15:49:16 -07:00
parent 0cd864134d
commit f1901237be

View File

@ -52,6 +52,7 @@ void NPairHalffullNewtoff::build(NeighList *list)
int inum_full = list->listfull->inum;
if (list->ghost) inum_full += list->listfull->gnum;
int inum = 0;
ipage->reset();
// loop over atoms in full list
@ -72,7 +73,7 @@ void NPairHalffullNewtoff::build(NeighList *list)
if (j > i) neighptr[n++] = joriginal;
}
ilist[ii] = i;
ilist[inum++] = i;
firstneigh[i] = neighptr;
numneigh[i] = n;
ipage->vgot(n);
@ -80,6 +81,13 @@ void NPairHalffullNewtoff::build(NeighList *list)
error->one(FLERR,"Neighbor list overflow, boost neigh_modify one");
}
list->inum = list->listfull->inum;
list->gnum = list->listfull->gnum;
list->inum = inum;
if (list->ghost) {
int num = 0;
for (i = 0; i < inum; i++)
if (ilist[i] < nlocal) num++;
else break;
list->inum = num;
list->gnum = inum - num;
}
}