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

This commit is contained in:
sjplimp
2014-10-30 16:42:14 +00:00
parent d291f079d5
commit 731f4e4674
4 changed files with 60 additions and 12 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -166,7 +166,7 @@ int ComputePairLocal::compute_pairs(int flag)
// skip if I or J are not in group
// for newton = 0 and J = ghost atom,
// need to insure I,J pair is only output by one proc
// use same itag,jtag lobic as in Neighbor::neigh_half_nsq()
// use same itag,jtag logic as in Neighbor::neigh_half_nsq()
// for flag = 0, just count pair interactions within force cutoff
// for flag = 1, calculate requested output fields

View File

@ -335,10 +335,12 @@ void ComputePropertyLocal::compute_local()
int ComputePropertyLocal::count_pairs(int allflag, int forceflag)
{
int i,j,m,ii,jj,inum,jnum,itype,jtype;
tagint itag,jtag;
double xtmp,ytmp,ztmp,delx,dely,delz,rsq;
int *ilist,*jlist,*numneigh,**firstneigh;
double **x = atom->x;
tagint *tag = atom->tag;
int *type = atom->type;
int *mask = atom->mask;
int nlocal = atom->nlocal;
@ -355,6 +357,9 @@ int ComputePropertyLocal::count_pairs(int allflag, int forceflag)
// loop over neighbors of my atoms
// skip if I or J are not in group
// for newton = 0 and J = ghost atom,
// need to insure I,J pair is only output by one proc
// use same itag,jtag logic as in Neighbor::neigh_half_nsq()
double **cutsq = force->pair->cutsq;
@ -366,6 +371,7 @@ int ComputePropertyLocal::count_pairs(int allflag, int forceflag)
xtmp = x[i][0];
ytmp = x[i][1];
ztmp = x[i][2];
itag = tag[i];
itype = type[i];
jlist = firstneigh[i];
jnum = numneigh[i];
@ -375,7 +381,23 @@ int ComputePropertyLocal::count_pairs(int allflag, int forceflag)
j &= NEIGHMASK;
if (!(mask[j] & groupbit)) continue;
if (newton_pair == 0 && j >= nlocal) continue;
// itag = jtag is possible for long cutoffs that include images of self
if (newton_pair == 0 && j >= nlocal) {
jtag = tag[j];
if (itag > jtag) {
if ((itag+jtag) % 2 == 0) continue;
} else if (itag < jtag) {
if ((itag+jtag) % 2 == 1) continue;
} else {
if (x[j][2] < ztmp) continue;
if (x[j][2] == ztmp) {
if (x[j][1] < ytmp) continue;
if (x[j][1] == ytmp && x[j][0] < xtmp) continue;
}
}
}
delx = xtmp - x[j][0];
dely = ytmp - x[j][1];