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

Only include ghosts for newton off, since this style exists as a standalone...

Only include ghosts for newton off, since this style exists as a standalone build, but the newton on method doesn't
parent dea8d592
No related branches found
No related tags found
No related merge requests found
...@@ -32,8 +32,6 @@ NPairHalffullNewton::NPairHalffullNewton(LAMMPS *lmp) : NPair(lmp) {} ...@@ -32,8 +32,6 @@ NPairHalffullNewton::NPairHalffullNewton(LAMMPS *lmp) : NPair(lmp) {}
pair stored once if i,j are both owned and i < j pair stored once if i,j are both owned and i < j
if j is ghost, only store if j coords are "above and to the right" of i if j is ghost, only store if j coords are "above and to the right" of i
works if full list is a skip list works if full list is a skip list
works for owned (non-ghost) list, also for ghost list
if ghost, also store neighbors of ghost atoms & set inum,gnum correctly
------------------------------------------------------------------------- */ ------------------------------------------------------------------------- */
void NPairHalffullNewton::build(NeighList *list) void NPairHalffullNewton::build(NeighList *list)
...@@ -54,8 +52,8 @@ void NPairHalffullNewton::build(NeighList *list) ...@@ -54,8 +52,8 @@ void NPairHalffullNewton::build(NeighList *list)
int *numneigh_full = list->listfull->numneigh; int *numneigh_full = list->listfull->numneigh;
int **firstneigh_full = list->listfull->firstneigh; int **firstneigh_full = list->listfull->firstneigh;
int inum_full = list->listfull->inum; int inum_full = list->listfull->inum;
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
...@@ -89,7 +87,7 @@ void NPairHalffullNewton::build(NeighList *list) ...@@ -89,7 +87,7 @@ void NPairHalffullNewton::build(NeighList *list)
neighptr[n++] = joriginal; neighptr[n++] = joriginal;
} }
ilist[ii] = i; ilist[inum++] = i;
firstneigh[i] = neighptr; firstneigh[i] = neighptr;
numneigh[i] = n; numneigh[i] = n;
ipage->vgot(n); ipage->vgot(n);
...@@ -97,6 +95,5 @@ void NPairHalffullNewton::build(NeighList *list) ...@@ -97,6 +95,5 @@ 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 = list->listfull->inum; list->inum = inum;
list->gnum = list->listfull->gnum;
} }
...@@ -23,16 +23,6 @@ NPairStyle(halffull/newton/skip, ...@@ -23,16 +23,6 @@ NPairStyle(halffull/newton/skip,
NP_HALF_FULL | NP_NEWTON | NP_HALF | NP_NSQ | NP_BIN | NP_MULTI | NP_HALF_FULL | NP_NEWTON | NP_HALF | NP_NSQ | NP_BIN | NP_MULTI |
NP_ORTHO | NP_TRI | NP_SKIP) NP_ORTHO | NP_TRI | NP_SKIP)
NPairStyle(halffull/newton/ghost,
NPairHalffullNewton,
NP_HALF_FULL | NP_NEWTON | NP_HALF | NP_NSQ | NP_BIN | NP_MULTI |
NP_ORTHO | NP_TRI | NP_GHOST)
NPairStyle(halffull/newton/skip/ghost,
NPairHalffullNewton,
NP_HALF_FULL | NP_NEWTON | NP_HALF | NP_NSQ | NP_BIN | NP_MULTI |
NP_ORTHO | NP_TRI | NP_SKIP | NP_GHOST)
#else #else
#ifndef LMP_NPAIR_HALFFULL_NEWTON_H #ifndef LMP_NPAIR_HALFFULL_NEWTON_H
......
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