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

This commit is contained in:
sjplimp 2008-12-01 22:01:59 +00:00
parent 4b92c1081d
commit 97927cfb7c
2 changed files with 4 additions and 3 deletions

View File

@ -870,7 +870,6 @@ void PairAIREBO::TORSION(int eflag, int vflag)
double **f = atom->f;
int *type = atom->type;
int *tag = atom->tag;
int nlocal = atom->nlocal;
inum = list->inum;
ilist = list->ilist;

View File

@ -163,8 +163,7 @@ void FixPeriNeigh::setup(int vflag)
delz = ztmp - x[j][2];
rsq = delx*delx + dely*dely + delz*delz;
jtype = type[j];
if (rsq < cutsq[itype][jtype]) npartner[i]++;
if (rsq <= cutsq[itype][jtype]) npartner[i]++;
}
}
@ -172,11 +171,14 @@ void FixPeriNeigh::setup(int vflag)
for (i = 0; i < nlocal; i++) maxpartner = MAX(maxpartner,npartner[i]);
int maxall;
MPI_Allreduce(&maxpartner,&maxall,1,MPI_INT,MPI_MAX,world);
maxpartner = maxall;
// realloc arrays with correct value for maxpartner
memory->destroy_2d_int_array(partner);
memory->destroy_2d_double_array(r0);
memory->sfree(npartner);
npartner = NULL;
partner = NULL;
r0 = NULL;