Skip to content
Snippets Groups Projects
Unverified Commit 0cd86413 authored by Steve Plimpton's avatar Steve Plimpton Committed by GitHub
Browse files

Merge pull request #765 from stanmoore1/halffull_ghost

Add ghost option to npair_halffull
parents bf48f3e2 f6075c9d
No related branches found
No related tags found
No related merge requests found
...@@ -32,6 +32,8 @@ NPairHalffullNewtoff::NPairHalffullNewtoff(LAMMPS *lmp) : NPair(lmp) {} ...@@ -32,6 +32,8 @@ NPairHalffullNewtoff::NPairHalffullNewtoff(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
pair stored by me if j is ghost (also stored by proc owning j) pair stored by me if j is ghost (also stored by proc owning j)
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 NPairHalffullNewtoff::build(NeighList *list) void NPairHalffullNewtoff::build(NeighList *list)
...@@ -48,8 +50,8 @@ void NPairHalffullNewtoff::build(NeighList *list) ...@@ -48,8 +50,8 @@ void NPairHalffullNewtoff::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 atoms in full list // loop over atoms in full list
...@@ -70,7 +72,7 @@ void NPairHalffullNewtoff::build(NeighList *list) ...@@ -70,7 +72,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);
...@@ -78,5 +80,6 @@ void NPairHalffullNewtoff::build(NeighList *list) ...@@ -78,5 +80,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;
list->gnum = list->listfull->gnum;
} }
...@@ -23,6 +23,16 @@ NPairStyle(halffull/newtoff/skip, ...@@ -23,6 +23,16 @@ NPairStyle(halffull/newtoff/skip,
NP_HALF_FULL | NP_NEWTOFF | NP_NSQ | NP_BIN | NP_MULTI | NP_HALF | NP_HALF_FULL | NP_NEWTOFF | NP_NSQ | NP_BIN | NP_MULTI | NP_HALF |
NP_ORTHO | NP_TRI | NP_SKIP) NP_ORTHO | NP_TRI | NP_SKIP)
NPairStyle(halffull/newtoff/ghost,
NPairHalffullNewtoff,
NP_HALF_FULL | NP_NEWTOFF | NP_NSQ | NP_BIN | NP_MULTI | NP_HALF |
NP_ORTHO | NP_TRI | NP_GHOST)
NPairStyle(halffull/newtoff/skip/ghost,
NPairHalffullNewtoff,
NP_HALF_FULL | NP_NEWTOFF | NP_NSQ | NP_BIN | NP_MULTI | NP_HALF |
NP_ORTHO | NP_TRI | NP_SKIP | NP_GHOST)
#else #else
#ifndef LMP_NPAIR_HALFFULL_NEWTOFF_H #ifndef LMP_NPAIR_HALFFULL_NEWTOFF_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