add warning to Comm class against zero communication cutoff

This commit is contained in:
Axel Kohlmeyer
2019-07-24 14:42:17 -04:00
parent 985c959a91
commit be1522d16d
2 changed files with 7 additions and 0 deletions

View File

@ -158,6 +158,10 @@ void CommTiled::setup()
// check that cutoff < any periodic box length
double cut = MAX(neighbor->cutneighmax,cutghostuser);
if ((cut == 0.0) && (me == 0))
error->warning(FLERR,"Communication cutoff is 0.0. No ghost atoms "
"will be generated. Atoms may get lost.");
cutghost[0] = cutghost[1] = cutghost[2] = cut;
if ((periodicity[0] && cut > prd[0]) ||