diff --git a/src/balance.cpp b/src/balance.cpp index dcbbf665f8..cf378766c8 100644 --- a/src/balance.cpp +++ b/src/balance.cpp @@ -488,14 +488,16 @@ int *Balance::bisection(int sortflag) rcb->invert(sortflag); // NOTE: this logic is specific to orthogonal boxes, not triclinic - // NOTE: check this: insure comm->rcbcut will be exactly equal to sub-box boundaries it touches + + // store RCB cut, dim, lo/hi box in CommTiled + // cut and lo/hi need to be in fractional form so can + // OK if changes by epsilon from what RCB used since particles + // will subsequently migrate to new owning procs by exchange() anyway + // ditto for particles exactly on lo/hi RCB box boundaries due to ties comm->rcbnew = 1; int idim = rcb->cutdim; - //double split = (rcb->cut - boxlo[idim]) / prd[idim]; - //comm->rcbcut = boxlo[idim] + prd[idim]*split; - comm->rcbcutfrac = (rcb->cut - boxlo[idim]) / prd[idim]; comm->rcbcutdim = idim; diff --git a/src/input.cpp b/src/input.cpp index 65f8d6c19a..785929bb21 100644 --- a/src/input.cpp +++ b/src/input.cpp @@ -733,7 +733,7 @@ void Input::ifthenelse() // must substitute on copy of arg else will step on subsequent args // bound and execute "elif" or "else" commands - while (1) { + while (iarg != narg) { if (iarg+2 > narg) error->all(FLERR,"Illegal if command"); if (strcmp(arg[iarg],"elif") == 0) { n = strlen(arg[iarg+1]) + 1;