Replacing binsizex with multi2 version

This commit is contained in:
Joel Clemmer
2020-11-30 20:55:04 -07:00
parent e716abd34a
commit 6308248a44
4 changed files with 6 additions and 5 deletions

View File

@ -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");
}

View File

@ -345,11 +345,11 @@ void NStencil::create_setup()
stencil_range = sqrt(cutneighsq[i][j]);
sx = static_cast<int> (stencil_range*bininvx_multi2[bin_type]);
if (sx*binsizex < stencil_range) sx++;
if (sx*binsizex_multi2[bin_type] < stencil_range) sx++;
sy = static_cast<int> (stencil_range*bininvy_multi2[bin_type]);
if (sy*binsizey < stencil_range) sy++;
if (sy*binsizey_multi2[bin_type] < stencil_range) sy++;
sz = static_cast<int> (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;