Skip to content
Snippets Groups Projects
Commit dea8d592 authored by Stan Moore's avatar Stan Moore
Browse files

Optimize npair_halffull styles; the number of i atoms, whether owned or ghost,...

Optimize npair_halffull styles; the number of i atoms, whether owned or ghost, must match between the child half list and parent full list
parent 1c10c786
No related branches found
No related tags found
No related merge requests found
...@@ -54,7 +54,6 @@ void NPairHalffullNewtoff::build(NeighList *list) ...@@ -54,7 +54,6 @@ void NPairHalffullNewtoff::build(NeighList *list)
int inum_full = list->listfull->inum; int inum_full = list->listfull->inum;
if (list->ghost) inum_full += list->listfull->gnum; if (list->ghost) inum_full += list->listfull->gnum;
int inum = 0;
ipage->reset(); ipage->reset();
// loop over atoms in full list // loop over atoms in full list
...@@ -75,7 +74,7 @@ void NPairHalffullNewtoff::build(NeighList *list) ...@@ -75,7 +74,7 @@ void NPairHalffullNewtoff::build(NeighList *list)
if (j > i) neighptr[n++] = joriginal; if (j > i) neighptr[n++] = joriginal;
} }
ilist[inum++] = i; ilist[ii] = i;
firstneigh[i] = neighptr; firstneigh[i] = neighptr;
numneigh[i] = n; numneigh[i] = n;
ipage->vgot(n); ipage->vgot(n);
...@@ -83,13 +82,6 @@ void NPairHalffullNewtoff::build(NeighList *list) ...@@ -83,13 +82,6 @@ void NPairHalffullNewtoff::build(NeighList *list)
error->one(FLERR,"Neighbor list overflow, boost neigh_modify one"); error->one(FLERR,"Neighbor list overflow, boost neigh_modify one");
} }
list->inum = inum; list->inum = list->listfull->inum;
if (list->ghost) { list->gnum = list->listfull->gnum;
int num = 0;
for (i = 0; i < inum; i++)
if (ilist[i] < nlocal) num++;
else break;
list->inum = num;
list->gnum = inum - num;
}
} }
...@@ -56,7 +56,6 @@ void NPairHalffullNewton::build(NeighList *list) ...@@ -56,7 +56,6 @@ void NPairHalffullNewton::build(NeighList *list)
int inum_full = list->listfull->inum; int inum_full = list->listfull->inum;
if (list->ghost) inum_full += list->listfull->gnum; if (list->ghost) inum_full += list->listfull->gnum;
int inum = 0;
ipage->reset(); ipage->reset();
// loop over parent full list // loop over parent full list
...@@ -90,7 +89,7 @@ void NPairHalffullNewton::build(NeighList *list) ...@@ -90,7 +89,7 @@ void NPairHalffullNewton::build(NeighList *list)
neighptr[n++] = joriginal; neighptr[n++] = joriginal;
} }
ilist[inum++] = i; ilist[ii] = i;
firstneigh[i] = neighptr; firstneigh[i] = neighptr;
numneigh[i] = n; numneigh[i] = n;
ipage->vgot(n); ipage->vgot(n);
...@@ -98,13 +97,6 @@ void NPairHalffullNewton::build(NeighList *list) ...@@ -98,13 +97,6 @@ void NPairHalffullNewton::build(NeighList *list)
error->one(FLERR,"Neighbor list overflow, boost neigh_modify one"); error->one(FLERR,"Neighbor list overflow, boost neigh_modify one");
} }
list->inum = inum; list->inum = list->listfull->inum;
if (list->ghost) { list->gnum = list->listfull->gnum;
int num = 0;
for (i = 0; i < inum; i++)
if (ilist[i] < nlocal) num++;
else break;
list->inum = num;
list->gnum = inum - num;
}
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment