diff --git a/src/comm.cpp b/src/comm.cpp index 2e1192e150..fdafdbaf17 100644 --- a/src/comm.cpp +++ b/src/comm.cpp @@ -248,6 +248,7 @@ void Comm::init() // Could remove NP_NEWTON from npair_full_*multi2*, but could be cryptic // Also could be cases where you want newton off (hybrid) but don't use multi2 comm // Could add check on neighbor build, if full and comm->multi2 error... + // or just add check on comm setup - is that run before every run? Only if box change... if (force->newton == 0 && multi2) error->all(FLERR,"Cannot use multi2 communication with Newton off"); } diff --git a/src/nstencil.cpp b/src/nstencil.cpp index 1658654e5a..709b48a257 100644 --- a/src/nstencil.cpp +++ b/src/nstencil.cpp @@ -345,11 +345,11 @@ void NStencil::create_setup() stencil_range = sqrt(cutneighsq[i][j]); sx = static_cast (stencil_range*bininvx_multi2[bin_type]); - if (sx*binsizex < stencil_range) sx++; + if (sx*binsizex_multi2[bin_type] < stencil_range) sx++; sy = static_cast (stencil_range*bininvy_multi2[bin_type]); - if (sy*binsizey < stencil_range) sy++; + if (sy*binsizey_multi2[bin_type] < stencil_range) sy++; sz = static_cast (stencil_range*bininvz_multi2[bin_type]); - if (sz*binsizez < stencil_range) sz++; + if (sz*binsizez_multi2[bin_type] < stencil_range) sz++; stencil_sx_multi2[i][j] = sx; stencil_sy_multi2[i][j] = sy; diff --git a/src/nstencil_half_multi2_2d.cpp b/src/nstencil_half_multi2_2d.cpp index c2f2127548..f240d87b54 100644 --- a/src/nstencil_half_multi2_2d.cpp +++ b/src/nstencil_half_multi2_2d.cpp @@ -88,7 +88,7 @@ void NStencilHalfMulti22d::create() if (j > 0 || (j == 0 && i > 0)) { if (bin_distance_multi2(i,j,0,bin_type) < cutsq) stencil_multi2[itype][jtype][ns++] = j*mbinx + i; - } + } } else { for (j = -sy; j <= sy; j++) for (i = -sx; i <= sx; i++) diff --git a/src/nstencil_half_multi2_3d.cpp b/src/nstencil_half_multi2_3d.cpp index 57702cdb50..83ecb24cba 100644 --- a/src/nstencil_half_multi2_3d.cpp +++ b/src/nstencil_half_multi2_3d.cpp @@ -92,7 +92,7 @@ void NStencilHalfMulti23d::create() if (bin_distance_multi2(i,j,k,bin_type) < cutsq) stencil_multi2[itype][jtype][ns++] = k*mbiny*mbinx + j*mbinx + i; - } + } } else { for (k = -sz; k <= sz; k++) for (j = -sy; j <= sy; j++)