Optimize npair_halffull styles; the number of i atoms, whether owned or ghost, must match between the child half list and parent full list

This commit is contained in:
Stan Moore 2018-01-12 15:51:54 -07:00
parent 1c10c78684
commit dea8d592da
2 changed files with 6 additions and 22 deletions

View File

@ -54,7 +54,6 @@ 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
@ -75,7 +74,7 @@ void NPairHalffullNewtoff::build(NeighList *list)
if (j > i) neighptr[n++] = joriginal;
}
ilist[inum++] = i;
ilist[ii] = i;
firstneigh[i] = neighptr;
numneigh[i] = n;
ipage->vgot(n);
@ -83,13 +82,6 @@ void NPairHalffullNewtoff::build(NeighList *list)
error->one(FLERR,"Neighbor list overflow, boost neigh_modify one");
}
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;
}
list->inum = list->listfull->inum;
list->gnum = list->listfull->gnum;
}

View File

@ -56,7 +56,6 @@ void NPairHalffullNewton::build(NeighList *list)
int inum_full = list->listfull->inum;
if (list->ghost) inum_full += list->listfull->gnum;
int inum = 0;
ipage->reset();
// loop over parent full list
@ -90,7 +89,7 @@ void NPairHalffullNewton::build(NeighList *list)
neighptr[n++] = joriginal;
}
ilist[inum++] = i;
ilist[ii] = i;
firstneigh[i] = neighptr;
numneigh[i] = n;
ipage->vgot(n);
@ -98,13 +97,6 @@ void NPairHalffullNewton::build(NeighList *list)
error->one(FLERR,"Neighbor list overflow, boost neigh_modify one");
}
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;
}
list->inum = list->listfull->inum;
list->gnum = list->listfull->gnum;
}