git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@8226 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
@ -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.
|
||||
@ -45,7 +45,7 @@ using namespace LAMMPS_NS;
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
void Neighbor::stencil_half_bin_2d_no_newton(NeighList *list,
|
||||
int sx, int sy, int sz)
|
||||
int sx, int sy, int sz)
|
||||
{
|
||||
int i,j;
|
||||
int *stencil = list->stencil;
|
||||
@ -54,7 +54,7 @@ void Neighbor::stencil_half_bin_2d_no_newton(NeighList *list,
|
||||
for (j = -sy; j <= sy; j++)
|
||||
for (i = -sx; i <= sx; i++)
|
||||
if (bin_distance(i,j,0) < cutneighmaxsq)
|
||||
stencil[nstencil++] = j*mbinx + i;
|
||||
stencil[nstencil++] = j*mbinx + i;
|
||||
|
||||
list->nstencil = nstencil;
|
||||
}
|
||||
@ -62,7 +62,7 @@ void Neighbor::stencil_half_bin_2d_no_newton(NeighList *list,
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
void Neighbor::stencil_half_bin_3d_no_newton(NeighList *list,
|
||||
int sx, int sy, int sz)
|
||||
int sx, int sy, int sz)
|
||||
{
|
||||
int i,j,k;
|
||||
int *stencil = list->stencil;
|
||||
@ -71,8 +71,8 @@ void Neighbor::stencil_half_bin_3d_no_newton(NeighList *list,
|
||||
for (k = -sz; k <= sz; k++)
|
||||
for (j = -sy; j <= sy; j++)
|
||||
for (i = -sx; i <= sx; i++)
|
||||
if (bin_distance(i,j,k) < cutneighmaxsq)
|
||||
stencil[nstencil++] = k*mbiny*mbinx + j*mbinx + i;
|
||||
if (bin_distance(i,j,k) < cutneighmaxsq)
|
||||
stencil[nstencil++] = k*mbiny*mbinx + j*mbinx + i;
|
||||
|
||||
list->nstencil = nstencil;
|
||||
}
|
||||
@ -80,7 +80,7 @@ void Neighbor::stencil_half_bin_3d_no_newton(NeighList *list,
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
void Neighbor::stencil_half_bin_2d_newton(NeighList *list,
|
||||
int sx, int sy, int sz)
|
||||
int sx, int sy, int sz)
|
||||
{
|
||||
int i,j;
|
||||
int *stencil = list->stencil;
|
||||
@ -89,8 +89,8 @@ void Neighbor::stencil_half_bin_2d_newton(NeighList *list,
|
||||
for (j = 0; j <= sy; j++)
|
||||
for (i = -sx; i <= sx; i++)
|
||||
if (j > 0 || (j == 0 && i > 0))
|
||||
if (bin_distance(i,j,0) < cutneighmaxsq)
|
||||
stencil[nstencil++] = j*mbinx + i;
|
||||
if (bin_distance(i,j,0) < cutneighmaxsq)
|
||||
stencil[nstencil++] = j*mbinx + i;
|
||||
|
||||
list->nstencil = nstencil;
|
||||
}
|
||||
@ -98,7 +98,7 @@ void Neighbor::stencil_half_bin_2d_newton(NeighList *list,
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
void Neighbor::stencil_half_bin_3d_newton(NeighList *list,
|
||||
int sx, int sy, int sz)
|
||||
int sx, int sy, int sz)
|
||||
{
|
||||
int i,j,k;
|
||||
int *stencil = list->stencil;
|
||||
@ -107,9 +107,9 @@ void Neighbor::stencil_half_bin_3d_newton(NeighList *list,
|
||||
for (k = 0; k <= sz; k++)
|
||||
for (j = -sy; j <= sy; j++)
|
||||
for (i = -sx; i <= sx; i++)
|
||||
if (k > 0 || j > 0 || (j == 0 && i > 0))
|
||||
if (bin_distance(i,j,k) < cutneighmaxsq)
|
||||
stencil[nstencil++] = k*mbiny*mbinx + j*mbinx + i;
|
||||
if (k > 0 || j > 0 || (j == 0 && i > 0))
|
||||
if (bin_distance(i,j,k) < cutneighmaxsq)
|
||||
stencil[nstencil++] = k*mbiny*mbinx + j*mbinx + i;
|
||||
|
||||
list->nstencil = nstencil;
|
||||
}
|
||||
@ -117,7 +117,7 @@ void Neighbor::stencil_half_bin_3d_newton(NeighList *list,
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
void Neighbor::stencil_half_bin_2d_newton_tri(NeighList *list,
|
||||
int sx, int sy, int sz)
|
||||
int sx, int sy, int sz)
|
||||
{
|
||||
int i,j;
|
||||
int *stencil = list->stencil;
|
||||
@ -126,7 +126,7 @@ void Neighbor::stencil_half_bin_2d_newton_tri(NeighList *list,
|
||||
for (j = 0; j <= sy; j++)
|
||||
for (i = -sx; i <= sx; i++)
|
||||
if (bin_distance(i,j,0) < cutneighmaxsq)
|
||||
stencil[nstencil++] = j*mbinx + i;
|
||||
stencil[nstencil++] = j*mbinx + i;
|
||||
|
||||
list->nstencil = nstencil;
|
||||
}
|
||||
@ -134,7 +134,7 @@ void Neighbor::stencil_half_bin_2d_newton_tri(NeighList *list,
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
void Neighbor::stencil_half_bin_3d_newton_tri(NeighList *list,
|
||||
int sx, int sy, int sz)
|
||||
int sx, int sy, int sz)
|
||||
{
|
||||
int i,j,k;
|
||||
int *stencil = list->stencil;
|
||||
@ -143,8 +143,8 @@ void Neighbor::stencil_half_bin_3d_newton_tri(NeighList *list,
|
||||
for (k = 0; k <= sz; k++)
|
||||
for (j = -sy; j <= sy; j++)
|
||||
for (i = -sx; i <= sx; i++)
|
||||
if (bin_distance(i,j,k) < cutneighmaxsq)
|
||||
stencil[nstencil++] = k*mbiny*mbinx + j*mbinx + i;
|
||||
if (bin_distance(i,j,k) < cutneighmaxsq)
|
||||
stencil[nstencil++] = k*mbiny*mbinx + j*mbinx + i;
|
||||
|
||||
list->nstencil = nstencil;
|
||||
}
|
||||
@ -152,7 +152,7 @@ void Neighbor::stencil_half_bin_3d_newton_tri(NeighList *list,
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
void Neighbor::stencil_half_multi_2d_no_newton(NeighList *list,
|
||||
int sx, int sy, int sz)
|
||||
int sx, int sy, int sz)
|
||||
{
|
||||
int i,j,n;
|
||||
double rsq,typesq;
|
||||
@ -171,11 +171,11 @@ void Neighbor::stencil_half_multi_2d_no_newton(NeighList *list,
|
||||
n = 0;
|
||||
for (j = -sy; j <= sy; j++)
|
||||
for (i = -sx; i <= sx; i++) {
|
||||
rsq = bin_distance(i,j,0);
|
||||
if (rsq < typesq) {
|
||||
distsq[n] = rsq;
|
||||
s[n++] = j*mbinx + i;
|
||||
}
|
||||
rsq = bin_distance(i,j,0);
|
||||
if (rsq < typesq) {
|
||||
distsq[n] = rsq;
|
||||
s[n++] = j*mbinx + i;
|
||||
}
|
||||
}
|
||||
nstencil_multi[itype] = n;
|
||||
}
|
||||
@ -184,7 +184,7 @@ void Neighbor::stencil_half_multi_2d_no_newton(NeighList *list,
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
void Neighbor::stencil_half_multi_3d_no_newton(NeighList *list,
|
||||
int sx, int sy, int sz)
|
||||
int sx, int sy, int sz)
|
||||
{
|
||||
int i,j,k,n;
|
||||
double rsq,typesq;
|
||||
@ -203,13 +203,13 @@ void Neighbor::stencil_half_multi_3d_no_newton(NeighList *list,
|
||||
n = 0;
|
||||
for (k = -sz; k <= sz; k++)
|
||||
for (j = -sy; j <= sy; j++)
|
||||
for (i = -sx; i <= sx; i++) {
|
||||
rsq = bin_distance(i,j,k);
|
||||
if (rsq < typesq) {
|
||||
distsq[n] = rsq;
|
||||
s[n++] = k*mbiny*mbinx + j*mbinx + i;
|
||||
}
|
||||
}
|
||||
for (i = -sx; i <= sx; i++) {
|
||||
rsq = bin_distance(i,j,k);
|
||||
if (rsq < typesq) {
|
||||
distsq[n] = rsq;
|
||||
s[n++] = k*mbiny*mbinx + j*mbinx + i;
|
||||
}
|
||||
}
|
||||
nstencil_multi[itype] = n;
|
||||
}
|
||||
}
|
||||
@ -217,7 +217,7 @@ void Neighbor::stencil_half_multi_3d_no_newton(NeighList *list,
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
void Neighbor::stencil_half_multi_2d_newton(NeighList *list,
|
||||
int sx, int sy, int sz)
|
||||
int sx, int sy, int sz)
|
||||
{
|
||||
int i,j,n;
|
||||
double rsq,typesq;
|
||||
@ -236,13 +236,13 @@ void Neighbor::stencil_half_multi_2d_newton(NeighList *list,
|
||||
n = 0;
|
||||
for (j = 0; j <= sy; j++)
|
||||
for (i = -sx; i <= sx; i++)
|
||||
if (j > 0 || (j == 0 && i > 0)) {
|
||||
rsq = bin_distance(i,j,0);
|
||||
if (rsq < typesq) {
|
||||
distsq[n] = rsq;
|
||||
s[n++] = j*mbinx + i;
|
||||
}
|
||||
}
|
||||
if (j > 0 || (j == 0 && i > 0)) {
|
||||
rsq = bin_distance(i,j,0);
|
||||
if (rsq < typesq) {
|
||||
distsq[n] = rsq;
|
||||
s[n++] = j*mbinx + i;
|
||||
}
|
||||
}
|
||||
nstencil_multi[itype] = n;
|
||||
}
|
||||
}
|
||||
@ -250,7 +250,7 @@ void Neighbor::stencil_half_multi_2d_newton(NeighList *list,
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
void Neighbor::stencil_half_multi_3d_newton(NeighList *list,
|
||||
int sx, int sy, int sz)
|
||||
int sx, int sy, int sz)
|
||||
{
|
||||
int i,j,k,n;
|
||||
double rsq,typesq;
|
||||
@ -269,14 +269,14 @@ void Neighbor::stencil_half_multi_3d_newton(NeighList *list,
|
||||
n = 0;
|
||||
for (k = 0; k <= sz; k++)
|
||||
for (j = -sy; j <= sy; j++)
|
||||
for (i = -sx; i <= sx; i++)
|
||||
if (k > 0 || j > 0 || (j == 0 && i > 0)) {
|
||||
rsq = bin_distance(i,j,k);
|
||||
if (rsq < typesq) {
|
||||
distsq[n] = rsq;
|
||||
s[n++] = k*mbiny*mbinx + j*mbinx + i;
|
||||
}
|
||||
}
|
||||
for (i = -sx; i <= sx; i++)
|
||||
if (k > 0 || j > 0 || (j == 0 && i > 0)) {
|
||||
rsq = bin_distance(i,j,k);
|
||||
if (rsq < typesq) {
|
||||
distsq[n] = rsq;
|
||||
s[n++] = k*mbiny*mbinx + j*mbinx + i;
|
||||
}
|
||||
}
|
||||
nstencil_multi[itype] = n;
|
||||
}
|
||||
}
|
||||
@ -284,7 +284,7 @@ void Neighbor::stencil_half_multi_3d_newton(NeighList *list,
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
void Neighbor::stencil_half_multi_2d_newton_tri(NeighList *list,
|
||||
int sx, int sy, int sz)
|
||||
int sx, int sy, int sz)
|
||||
{
|
||||
int i,j,n;
|
||||
double rsq,typesq;
|
||||
@ -303,11 +303,11 @@ void Neighbor::stencil_half_multi_2d_newton_tri(NeighList *list,
|
||||
n = 0;
|
||||
for (j = 0; j <= sy; j++)
|
||||
for (i = -sx; i <= sx; i++) {
|
||||
rsq = bin_distance(i,j,0);
|
||||
if (rsq < typesq) {
|
||||
distsq[n] = rsq;
|
||||
s[n++] = j*mbinx + i;
|
||||
}
|
||||
rsq = bin_distance(i,j,0);
|
||||
if (rsq < typesq) {
|
||||
distsq[n] = rsq;
|
||||
s[n++] = j*mbinx + i;
|
||||
}
|
||||
}
|
||||
nstencil_multi[itype] = n;
|
||||
}
|
||||
@ -317,7 +317,7 @@ void Neighbor::stencil_half_multi_2d_newton_tri(NeighList *list,
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
void Neighbor::stencil_half_multi_3d_newton_tri(NeighList *list,
|
||||
int sx, int sy, int sz)
|
||||
int sx, int sy, int sz)
|
||||
{
|
||||
int i,j,k,n;
|
||||
double rsq,typesq;
|
||||
@ -336,13 +336,13 @@ void Neighbor::stencil_half_multi_3d_newton_tri(NeighList *list,
|
||||
n = 0;
|
||||
for (k = 0; k <= sz; k++)
|
||||
for (j = -sy; j <= sy; j++)
|
||||
for (i = -sx; i <= sx; i++) {
|
||||
rsq = bin_distance(i,j,k);
|
||||
if (rsq < typesq) {
|
||||
distsq[n] = rsq;
|
||||
s[n++] = k*mbiny*mbinx + j*mbinx + i;
|
||||
}
|
||||
}
|
||||
for (i = -sx; i <= sx; i++) {
|
||||
rsq = bin_distance(i,j,k);
|
||||
if (rsq < typesq) {
|
||||
distsq[n] = rsq;
|
||||
s[n++] = k*mbiny*mbinx + j*mbinx + i;
|
||||
}
|
||||
}
|
||||
nstencil_multi[itype] = n;
|
||||
}
|
||||
}
|
||||
@ -350,7 +350,7 @@ void Neighbor::stencil_half_multi_3d_newton_tri(NeighList *list,
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
void Neighbor::stencil_full_bin_2d(NeighList *list,
|
||||
int sx, int sy, int sz)
|
||||
int sx, int sy, int sz)
|
||||
{
|
||||
int i,j;
|
||||
int *stencil = list->stencil;
|
||||
@ -359,7 +359,7 @@ void Neighbor::stencil_full_bin_2d(NeighList *list,
|
||||
for (j = -sy; j <= sy; j++)
|
||||
for (i = -sx; i <= sx; i++)
|
||||
if (bin_distance(i,j,0) < cutneighmaxsq)
|
||||
stencil[nstencil++] = j*mbinx + i;
|
||||
stencil[nstencil++] = j*mbinx + i;
|
||||
|
||||
list->nstencil = nstencil;
|
||||
}
|
||||
@ -367,7 +367,7 @@ void Neighbor::stencil_full_bin_2d(NeighList *list,
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
void Neighbor::stencil_full_ghost_bin_2d(NeighList *list,
|
||||
int sx, int sy, int sz)
|
||||
int sx, int sy, int sz)
|
||||
{
|
||||
int i,j;
|
||||
int *stencil = list->stencil;
|
||||
@ -377,10 +377,10 @@ void Neighbor::stencil_full_ghost_bin_2d(NeighList *list,
|
||||
for (j = -sy; j <= sy; j++)
|
||||
for (i = -sx; i <= sx; i++)
|
||||
if (bin_distance(i,j,0) < cutneighmaxsq) {
|
||||
stencilxyz[nstencil][0] = i;
|
||||
stencilxyz[nstencil][1] = j;
|
||||
stencilxyz[nstencil][2] = 0;
|
||||
stencil[nstencil++] = j*mbinx + i;
|
||||
stencilxyz[nstencil][0] = i;
|
||||
stencilxyz[nstencil][1] = j;
|
||||
stencilxyz[nstencil][2] = 0;
|
||||
stencil[nstencil++] = j*mbinx + i;
|
||||
}
|
||||
|
||||
list->nstencil = nstencil;
|
||||
@ -389,7 +389,7 @@ void Neighbor::stencil_full_ghost_bin_2d(NeighList *list,
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
void Neighbor::stencil_full_bin_3d(NeighList *list,
|
||||
int sx, int sy, int sz)
|
||||
int sx, int sy, int sz)
|
||||
{
|
||||
int i,j,k;
|
||||
int *stencil = list->stencil;
|
||||
@ -398,8 +398,8 @@ void Neighbor::stencil_full_bin_3d(NeighList *list,
|
||||
for (k = -sz; k <= sz; k++)
|
||||
for (j = -sy; j <= sy; j++)
|
||||
for (i = -sx; i <= sx; i++)
|
||||
if (bin_distance(i,j,k) < cutneighmaxsq)
|
||||
stencil[nstencil++] = k*mbiny*mbinx + j*mbinx + i;
|
||||
if (bin_distance(i,j,k) < cutneighmaxsq)
|
||||
stencil[nstencil++] = k*mbiny*mbinx + j*mbinx + i;
|
||||
|
||||
list->nstencil = nstencil;
|
||||
}
|
||||
@ -407,7 +407,7 @@ void Neighbor::stencil_full_bin_3d(NeighList *list,
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
void Neighbor::stencil_full_ghost_bin_3d(NeighList *list,
|
||||
int sx, int sy, int sz)
|
||||
int sx, int sy, int sz)
|
||||
{
|
||||
int i,j,k;
|
||||
int *stencil = list->stencil;
|
||||
@ -417,12 +417,12 @@ void Neighbor::stencil_full_ghost_bin_3d(NeighList *list,
|
||||
for (k = -sz; k <= sz; k++)
|
||||
for (j = -sy; j <= sy; j++)
|
||||
for (i = -sx; i <= sx; i++)
|
||||
if (bin_distance(i,j,k) < cutneighmaxsq) {
|
||||
stencilxyz[nstencil][0] = i;
|
||||
stencilxyz[nstencil][1] = j;
|
||||
stencilxyz[nstencil][2] = k;
|
||||
stencil[nstencil++] = k*mbiny*mbinx + j*mbinx + i;
|
||||
}
|
||||
if (bin_distance(i,j,k) < cutneighmaxsq) {
|
||||
stencilxyz[nstencil][0] = i;
|
||||
stencilxyz[nstencil][1] = j;
|
||||
stencilxyz[nstencil][2] = k;
|
||||
stencil[nstencil++] = k*mbiny*mbinx + j*mbinx + i;
|
||||
}
|
||||
|
||||
list->nstencil = nstencil;
|
||||
}
|
||||
@ -430,7 +430,7 @@ void Neighbor::stencil_full_ghost_bin_3d(NeighList *list,
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
void Neighbor::stencil_full_multi_2d(NeighList *list,
|
||||
int sx, int sy, int sz)
|
||||
int sx, int sy, int sz)
|
||||
{
|
||||
int i,j,n;
|
||||
double rsq,typesq;
|
||||
@ -449,11 +449,11 @@ void Neighbor::stencil_full_multi_2d(NeighList *list,
|
||||
n = 0;
|
||||
for (j = -sy; j <= sy; j++)
|
||||
for (i = -sx; i <= sx; i++) {
|
||||
rsq = bin_distance(i,j,0);
|
||||
if (rsq < typesq) {
|
||||
distsq[n] = rsq;
|
||||
s[n++] = j*mbinx + i;
|
||||
}
|
||||
rsq = bin_distance(i,j,0);
|
||||
if (rsq < typesq) {
|
||||
distsq[n] = rsq;
|
||||
s[n++] = j*mbinx + i;
|
||||
}
|
||||
}
|
||||
nstencil_multi[itype] = n;
|
||||
}
|
||||
@ -462,7 +462,7 @@ void Neighbor::stencil_full_multi_2d(NeighList *list,
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
void Neighbor::stencil_full_multi_3d(NeighList *list,
|
||||
int sx, int sy, int sz)
|
||||
int sx, int sy, int sz)
|
||||
{
|
||||
int i,j,k,n;
|
||||
double rsq,typesq;
|
||||
@ -481,13 +481,13 @@ void Neighbor::stencil_full_multi_3d(NeighList *list,
|
||||
n = 0;
|
||||
for (k = -sz; k <= sz; k++)
|
||||
for (j = -sy; j <= sy; j++)
|
||||
for (i = -sx; i <= sx; i++) {
|
||||
rsq = bin_distance(i,j,k);
|
||||
if (rsq < typesq) {
|
||||
distsq[n] = rsq;
|
||||
s[n++] = k*mbiny*mbinx + j*mbinx + i;
|
||||
}
|
||||
}
|
||||
for (i = -sx; i <= sx; i++) {
|
||||
rsq = bin_distance(i,j,k);
|
||||
if (rsq < typesq) {
|
||||
distsq[n] = rsq;
|
||||
s[n++] = k*mbiny*mbinx + j*mbinx + i;
|
||||
}
|
||||
}
|
||||
nstencil_multi[itype] = n;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user