Changing logic for self-bin check, newton+ortho
This commit is contained in:
@ -117,7 +117,7 @@ void NPairBinOmp<HALF, NEWTON, TRI, SIZE, ATOMONLY>::build(NeighList *list)
|
||||
for (k = 0; k < nstencil; k++) {
|
||||
bin_start = binhead[ibin + stencil[k]];
|
||||
if (HALF && NEWTON && (!TRI)) {
|
||||
if (stencil[k] == 0) {
|
||||
if (k == 0) {
|
||||
// Half neighbor list, newton on, orthonormal
|
||||
// loop over rest of atoms in i's bin, ghosts are at end of linked list
|
||||
bin_start = bins[i];
|
||||
@ -163,7 +163,7 @@ void NPairBinOmp<HALF, NEWTON, TRI, SIZE, ATOMONLY>::build(NeighList *list)
|
||||
// Half neighbor list, newton on, orthonormal
|
||||
// store every pair for every bin in stencil, except for i's bin
|
||||
|
||||
if (stencil[k] == 0) {
|
||||
if (k == 0) {
|
||||
// if j is owned atom, store it, since j is beyond i in linked list
|
||||
// if j is ghost, only store if j coords are "above and to the "right" of i
|
||||
if (j >= nlocal) {
|
||||
|
||||
@ -119,7 +119,7 @@ void NPairMultiOldOmp<HALF, NEWTON, TRI, SIZE>::build(NeighList *list)
|
||||
ns = nstencil_multi_old[itype];
|
||||
for (k = 0; k < ns; k++) {
|
||||
bin_start = binhead[ibin+s[k]];
|
||||
if (s[k] == 0) {
|
||||
if (k == 0) {
|
||||
if (HALF && NEWTON && (!TRI)) {
|
||||
// Half neighbor list, newton on, orthonormal
|
||||
// loop over rest of atoms in i's bin, ghosts are at end of linked list
|
||||
@ -166,7 +166,7 @@ void NPairMultiOldOmp<HALF, NEWTON, TRI, SIZE>::build(NeighList *list)
|
||||
// Half neighbor list, newton on, orthonormal
|
||||
// store every pair for every bin in stencil,except for i's bin
|
||||
|
||||
if (s[k] == 0) {
|
||||
if (k == 0) {
|
||||
// if j is owned atom, store it, since j is beyond i in linked list
|
||||
// if j is ghost, only store if j coords are "above and to the "right" of i
|
||||
if (j >= nlocal) {
|
||||
|
||||
@ -131,7 +131,7 @@ void NPairMultiOmp<HALF, NEWTON, TRI, SIZE, ATOMONLY>::build(NeighList *list)
|
||||
|
||||
// own-bin for half stencil
|
||||
if (HALF && !TRI)
|
||||
if (flag_half_multi[icollection][jcollection] && s[k] == 0) js = bins[i];
|
||||
if (k == 0 && flag_half_multi[icollection][jcollection]) js = bins[i];
|
||||
|
||||
for (j = js; j >= 0; j = bins[j]) {
|
||||
if (!HALF) {
|
||||
@ -180,8 +180,7 @@ void NPairMultiOmp<HALF, NEWTON, TRI, SIZE, ATOMONLY>::build(NeighList *list)
|
||||
} else {
|
||||
// Half neighbor list, newton on, orthonormal
|
||||
// if same size: uses half stencil so includes a check of the central bin
|
||||
if (flag_half_multi[icollection][jcollection]){
|
||||
if (s[k] == 0) {
|
||||
if (k == 0 && flag_half_multi[icollection][jcollection]) {
|
||||
// if same collection,
|
||||
// if j is owned atom, store it, since j is beyond i in linked list
|
||||
// if j is ghost, only store if j coords are "above and to the right" of i
|
||||
@ -201,7 +200,6 @@ void NPairMultiOmp<HALF, NEWTON, TRI, SIZE, ATOMONLY>::build(NeighList *list)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
jtype = type[j];
|
||||
if (exclude && exclusion(i, j, itype, jtype, mask, molecule)) continue;
|
||||
|
||||
@ -135,7 +135,7 @@ void NPairRespaBinOmp<NEWTON, TRI>::build(NeighList *list)
|
||||
for (k = 0; k < nstencil; k++) {
|
||||
bin_start = binhead[ibin + stencil[k]];
|
||||
if (NEWTON && (!TRI)) {
|
||||
if (stencil[k] == 0) {
|
||||
if (k == 0) {
|
||||
// Half neighbor list, newton on, orthonormal
|
||||
// loop over rest of atoms in i's bin, ghosts are at end of linked list
|
||||
bin_start = bins[i];
|
||||
@ -177,7 +177,7 @@ void NPairRespaBinOmp<NEWTON, TRI>::build(NeighList *list)
|
||||
// Half neighbor list, newton on, orthonormal
|
||||
// store every pair for every bin in stencil,except for i's bin
|
||||
|
||||
if (stencil[k] == 0) {
|
||||
if (k == 0) {
|
||||
// if j is owned atom, store it, since j is beyond i in linked list
|
||||
// if j is ghost, only store if j coords are "above and to the "right" of i
|
||||
if (j >= nlocal) {
|
||||
|
||||
@ -110,7 +110,7 @@ void NPairBin<HALF, NEWTON, TRI, SIZE, ATOMONLY>::build(NeighList *list)
|
||||
for (k = 0; k < nstencil; k++) {
|
||||
bin_start = binhead[ibin + stencil[k]];
|
||||
if (HALF && NEWTON && (!TRI)) {
|
||||
if (stencil[k] == 0) {
|
||||
if (k == 0) {
|
||||
// Half neighbor list, newton on, orthonormal
|
||||
// loop over rest of atoms in i's bin, ghosts are at end of linked list
|
||||
bin_start = bins[i];
|
||||
@ -155,7 +155,7 @@ void NPairBin<HALF, NEWTON, TRI, SIZE, ATOMONLY>::build(NeighList *list)
|
||||
// Half neighbor list, newton on, orthonormal
|
||||
// store every pair for every bin in stencil, except for i's bin
|
||||
|
||||
if (stencil[k] == 0) {
|
||||
if (k == 0) {
|
||||
// if j is owned atom, store it, since j is beyond i in linked list
|
||||
// if j is ghost, only store if j coords are "above and to the "right" of i
|
||||
if (j >= nlocal) {
|
||||
|
||||
@ -128,7 +128,7 @@ void NPairMulti<HALF, NEWTON, TRI, SIZE, ATOMONLY>::build(NeighList *list)
|
||||
|
||||
// own-bin for half stencil
|
||||
if (HALF && !TRI)
|
||||
if (flag_half_multi[icollection][jcollection] && s[k] == 0) js = bins[i];
|
||||
if (k == 0 && flag_half_multi[icollection][jcollection]) js = bins[i];
|
||||
|
||||
for (j = js; j >= 0; j = bins[j]) {
|
||||
if (!HALF) {
|
||||
@ -177,8 +177,7 @@ void NPairMulti<HALF, NEWTON, TRI, SIZE, ATOMONLY>::build(NeighList *list)
|
||||
} else {
|
||||
// Half neighbor list, newton on, orthonormal
|
||||
// if same size: uses half stencil so includes a check of the central bin
|
||||
if (flag_half_multi[icollection][jcollection]) {
|
||||
if (s[k] == 0) {
|
||||
if (k == 0 && flag_half_multi[icollection][jcollection]) {
|
||||
// if same collection,
|
||||
// if j is owned atom, store it, since j is beyond i in linked list
|
||||
// if j is ghost, only store if j coords are "above and to the right" of i
|
||||
@ -198,7 +197,6 @@ void NPairMulti<HALF, NEWTON, TRI, SIZE, ATOMONLY>::build(NeighList *list)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
jtype = type[j];
|
||||
if (exclude && exclusion(i, j, itype, jtype, mask, molecule)) continue;
|
||||
|
||||
@ -113,7 +113,7 @@ void NPairMultiOld<HALF, NEWTON, TRI, SIZE>::build(NeighList *list)
|
||||
for (k = 0; k < ns; k++) {
|
||||
bin_start = binhead[ibin + s[k]];
|
||||
if (HALF && NEWTON && (!TRI)) {
|
||||
if (s[k] == 0) {
|
||||
if (k == 0) {
|
||||
// Half neighbor list, newton on, orthonormal
|
||||
// loop over rest of atoms in i's bin, ghosts are at end of linked list
|
||||
bin_start = bins[i];
|
||||
@ -159,7 +159,7 @@ void NPairMultiOld<HALF, NEWTON, TRI, SIZE>::build(NeighList *list)
|
||||
// Half neighbor list, newton on, orthonormal
|
||||
// store every pair for every bin in stencil,except for i's bin
|
||||
|
||||
if (s[k] == 0) {
|
||||
if (k == 0) {
|
||||
// if j is owned atom, store it, since j is beyond i in linked list
|
||||
// if j is ghost, only store if j coords are "above and to the "right" of i
|
||||
if (j >= nlocal) {
|
||||
|
||||
@ -123,7 +123,7 @@ void NPairRespaBin<NEWTON, TRI>::build(NeighList *list)
|
||||
for (k = 0; k < nstencil; k++) {
|
||||
bin_start = binhead[ibin+stencil[k]];
|
||||
if (NEWTON && (!TRI)) {
|
||||
if (stencil[k] == 0) {
|
||||
if (k == 0) {
|
||||
// Half neighbor list, newton on, orthonormal
|
||||
// loop over rest of atoms in i's bin, ghosts are at end of linked list
|
||||
bin_start = bins[i];
|
||||
@ -165,7 +165,7 @@ void NPairRespaBin<NEWTON, TRI>::build(NeighList *list)
|
||||
// Half neighbor list, newton on, orthonormal
|
||||
// store every pair for every bin in stencil,except for i's bin
|
||||
|
||||
if (stencil[k] == 0) {
|
||||
if (k == 0) {
|
||||
// if j is owned atom, store it, since j is beyond i in linked list
|
||||
// if j is ghost, only store if j coords are "above and to the "right" of i
|
||||
if (j >= nlocal) {
|
||||
|
||||
Reference in New Issue
Block a user