git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@1115 f3b2605a-c512-4ea7-a41b-209d697bcdaa

This commit is contained in:
sjplimp 2007-11-02 15:11:32 +00:00
parent 100d5de45b
commit f12471d507
1 changed files with 6 additions and 4 deletions

View File

@ -82,18 +82,19 @@ void Neighbor::half_from_full_no_newton(NeighList *list)
/* ---------------------------------------------------------------------- /* ----------------------------------------------------------------------
build half list from full list build half list from full list
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) 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
------------------------------------------------------------------------- */ ------------------------------------------------------------------------- */
void Neighbor::half_from_full_newton(NeighList *list) void Neighbor::half_from_full_newton(NeighList *list)
{ {
int i,j,ii,jj,n,jnum; int i,j,ii,jj,n,jnum,joriginal;
int *neighptr,*jlist; int *neighptr,*jlist;
double xtmp,ytmp,ztmp; double xtmp,ytmp,ztmp;
double **x = atom->x; double **x = atom->x;
int nlocal = atom->nlocal; int nlocal = atom->nlocal;
int nall = atom->nlocal + atom->nghost;
int *ilist = list->ilist; int *ilist = list->ilist;
int *numneigh = list->numneigh; int *numneigh = list->numneigh;
@ -132,15 +133,16 @@ void Neighbor::half_from_full_newton(NeighList *list)
jnum = numneigh_full[i]; jnum = numneigh_full[i];
for (jj = 0; jj < jnum; jj++) { for (jj = 0; jj < jnum; jj++) {
j = jlist[jj]; j = joriginal = jlist[jj];
if (j < nlocal) { if (j < nlocal) {
if (i > j) continue; if (i > j) continue;
} else { } else {
if (j >= nall) j %= nall;
if (x[j][2] < ztmp) continue; if (x[j][2] < ztmp) continue;
if (x[j][2] == ztmp && x[j][1] < ytmp) continue; if (x[j][2] == ztmp && x[j][1] < ytmp) continue;
if (x[j][2] == ztmp && x[j][1] == ytmp && x[j][0] < xtmp) continue; if (x[j][2] == ztmp && x[j][1] == ytmp && x[j][0] < xtmp) continue;
} }
neighptr[n++] = j; neighptr[n++] = joriginal;
} }
ilist[inum] = i; ilist[inum] = i;