forked from lijiext/lammps
git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@2261 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
parent
4b92c1081d
commit
97927cfb7c
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue