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

This commit is contained in:
sjplimp
2012-06-06 22:47:51 +00:00
parent f46eb9dedb
commit ef9e700545
1408 changed files with 58053 additions and 57983 deletions

View File

@ -5,7 +5,7 @@
Copyright (2003) Sandia Corporation. Under the terms of Contract
DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains
certain rights in this software. This software is distributed under
certain rights in this software. This software is distributed under
the GNU General Public License.
See the README file in the top-level LAMMPS directory.
@ -84,11 +84,11 @@ void Neighbor::granular_nsq_no_newton(NeighList *list)
npnt = 0;
npage++;
if (npage == list->maxpage) {
pages = list->add_pages();
if (fix_history) {
pages_touch = listgranhistory->add_pages();
pages_shear = listgranhistory->dpages;
}
pages = list->add_pages();
if (fix_history) {
pages_touch = listgranhistory->add_pages();
pages_shear = listgranhistory->dpages;
}
}
}
@ -119,34 +119,34 @@ void Neighbor::granular_nsq_no_newton(NeighList *list)
cutsq = (radsum+skin) * (radsum+skin);
if (rsq <= cutsq) {
neighptr[n] = j;
neighptr[n] = j;
if (fix_history) {
if (rsq < radsum*radsum) {
for (m = 0; m < npartner[i]; m++)
if (partner[i][m] == tag[j]) break;
if (m < npartner[i]) {
touchptr[n] = 1;
shearptr[nn++] = shearpartner[i][m][0];
shearptr[nn++] = shearpartner[i][m][1];
shearptr[nn++] = shearpartner[i][m][2];
} else {
touchptr[n] = 0;
shearptr[nn++] = 0.0;
shearptr[nn++] = 0.0;
shearptr[nn++] = 0.0;
}
} else {
touchptr[n] = 0;
shearptr[nn++] = 0.0;
shearptr[nn++] = 0.0;
shearptr[nn++] = 0.0;
}
}
if (fix_history) {
if (rsq < radsum*radsum) {
for (m = 0; m < npartner[i]; m++)
if (partner[i][m] == tag[j]) break;
if (m < npartner[i]) {
touchptr[n] = 1;
shearptr[nn++] = shearpartner[i][m][0];
shearptr[nn++] = shearpartner[i][m][1];
shearptr[nn++] = shearpartner[i][m][2];
} else {
touchptr[n] = 0;
shearptr[nn++] = 0.0;
shearptr[nn++] = 0.0;
shearptr[nn++] = 0.0;
}
} else {
touchptr[n] = 0;
shearptr[nn++] = 0.0;
shearptr[nn++] = 0.0;
shearptr[nn++] = 0.0;
}
}
n++;
n++;
}
}
}
ilist[inum++] = i;
firstneigh[i] = neighptr;
@ -224,18 +224,18 @@ void Neighbor::granular_nsq_newton(NeighList *list)
if (includegroup && !(mask[j] & bitmask)) continue;
if (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;
}
}
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;
}
}
}
if (exclude && exclusion(i,j,type[i],type[j],mask,molecule)) continue;
@ -246,7 +246,7 @@ void Neighbor::granular_nsq_newton(NeighList *list)
rsq = delx*delx + dely*dely + delz*delz;
radsum = radi + radius[j];
cutsq = (radsum+skin) * (radsum+skin);
if (rsq <= cutsq) neighptr[n++] = j;
}
@ -330,11 +330,11 @@ void Neighbor::granular_bin_no_newton(NeighList *list)
npnt = 0;
npage++;
if (npage == list->maxpage) {
pages = list->add_pages();
if (fix_history) {
pages_touch = listgranhistory->add_pages();
pages_shear = listgranhistory->dpages;
}
pages = list->add_pages();
if (fix_history) {
pages_touch = listgranhistory->add_pages();
pages_shear = listgranhistory->dpages;
}
}
}
@ -359,44 +359,44 @@ void Neighbor::granular_bin_no_newton(NeighList *list)
for (k = 0; k < nstencil; k++) {
for (j = binhead[ibin+stencil[k]]; j >= 0; j = bins[j]) {
if (j <= i) continue;
if (exclude && exclusion(i,j,type[i],type[j],mask,molecule)) continue;
if (j <= i) continue;
if (exclude && exclusion(i,j,type[i],type[j],mask,molecule)) continue;
delx = xtmp - x[j][0];
dely = ytmp - x[j][1];
delz = ztmp - x[j][2];
rsq = delx*delx + dely*dely + delz*delz;
radsum = radi + radius[j];
cutsq = (radsum+skin) * (radsum+skin);
delx = xtmp - x[j][0];
dely = ytmp - x[j][1];
delz = ztmp - x[j][2];
rsq = delx*delx + dely*dely + delz*delz;
radsum = radi + radius[j];
cutsq = (radsum+skin) * (radsum+skin);
if (rsq <= cutsq) {
neighptr[n] = j;
if (rsq <= cutsq) {
neighptr[n] = j;
if (fix_history) {
if (rsq < radsum*radsum) {
for (m = 0; m < npartner[i]; m++)
if (partner[i][m] == tag[j]) break;
if (m < npartner[i]) {
touchptr[n] = 1;
shearptr[nn++] = shearpartner[i][m][0];
shearptr[nn++] = shearpartner[i][m][1];
shearptr[nn++] = shearpartner[i][m][2];
} else {
touchptr[n] = 0;
shearptr[nn++] = 0.0;
shearptr[nn++] = 0.0;
shearptr[nn++] = 0.0;
}
} else {
touchptr[n] = 0;
shearptr[nn++] = 0.0;
shearptr[nn++] = 0.0;
shearptr[nn++] = 0.0;
}
}
if (fix_history) {
if (rsq < radsum*radsum) {
for (m = 0; m < npartner[i]; m++)
if (partner[i][m] == tag[j]) break;
if (m < npartner[i]) {
touchptr[n] = 1;
shearptr[nn++] = shearpartner[i][m][0];
shearptr[nn++] = shearpartner[i][m][1];
shearptr[nn++] = shearpartner[i][m][2];
} else {
touchptr[n] = 0;
shearptr[nn++] = 0.0;
shearptr[nn++] = 0.0;
shearptr[nn++] = 0.0;
}
} else {
touchptr[n] = 0;
shearptr[nn++] = 0.0;
shearptr[nn++] = 0.0;
shearptr[nn++] = 0.0;
}
}
n++;
}
n++;
}
}
}
@ -477,11 +477,11 @@ void Neighbor::granular_bin_newton(NeighList *list)
for (j = bins[i]; j >= 0; j = bins[j]) {
if (j >= nlocal) {
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;
}
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;
}
}
if (exclude && exclusion(i,j,type[i],type[j],mask,molecule)) continue;
@ -501,16 +501,16 @@ void Neighbor::granular_bin_newton(NeighList *list)
ibin = coord2bin(x[i]);
for (k = 0; k < nstencil; k++) {
for (j = binhead[ibin+stencil[k]]; j >= 0; j = bins[j]) {
if (exclude && exclusion(i,j,type[i],type[j],mask,molecule)) continue;
if (exclude && exclusion(i,j,type[i],type[j],mask,molecule)) continue;
delx = xtmp - x[j][0];
dely = ytmp - x[j][1];
delz = ztmp - x[j][2];
rsq = delx*delx + dely*dely + delz*delz;
radsum = radi + radius[j];
cutsq = (radsum+skin) * (radsum+skin);
delx = xtmp - x[j][0];
dely = ytmp - x[j][1];
delz = ztmp - x[j][2];
rsq = delx*delx + dely*dely + delz*delz;
radsum = radi + radius[j];
cutsq = (radsum+skin) * (radsum+skin);
if (rsq <= cutsq) neighptr[n++] = j;
if (rsq <= cutsq) neighptr[n++] = j;
}
}
@ -590,25 +590,25 @@ void Neighbor::granular_bin_newton_tri(NeighList *list)
ibin = coord2bin(x[i]);
for (k = 0; k < nstencil; k++) {
for (j = binhead[ibin+stencil[k]]; j >= 0; j = bins[j]) {
if (x[j][2] < ztmp) continue;
if (x[j][2] == ztmp) {
if (x[j][1] < ytmp) continue;
if (x[j][1] == ytmp) {
if (x[j][0] < xtmp) continue;
if (x[j][0] == xtmp && j <= i) continue;
}
}
if (x[j][2] < ztmp) continue;
if (x[j][2] == ztmp) {
if (x[j][1] < ytmp) continue;
if (x[j][1] == ytmp) {
if (x[j][0] < xtmp) continue;
if (x[j][0] == xtmp && j <= i) continue;
}
}
if (exclude && exclusion(i,j,type[i],type[j],mask,molecule)) continue;
if (exclude && exclusion(i,j,type[i],type[j],mask,molecule)) continue;
delx = xtmp - x[j][0];
dely = ytmp - x[j][1];
delz = ztmp - x[j][2];
rsq = delx*delx + dely*dely + delz*delz;
radsum = radi + radius[j];
cutsq = (radsum+skin) * (radsum+skin);
delx = xtmp - x[j][0];
dely = ytmp - x[j][1];
delz = ztmp - x[j][2];
rsq = delx*delx + dely*dely + delz*delz;
radsum = radi + radius[j];
cutsq = (radsum+skin) * (radsum+skin);
if (rsq <= cutsq) neighptr[n++] = j;
if (rsq <= cutsq) neighptr[n++] = j;
}
}