Unverified Commit be1522d1 authored by Axel Kohlmeyer's avatar Axel Kohlmeyer
Browse files

add warning to Comm class against zero communication cutoff

parent 985c959a
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -176,6 +176,9 @@ void CommBrick::setup()
  double *prd,*sublo,*subhi;

  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.");

  if (triclinic == 0) {
    prd = domain->prd;
+4 −0
Original line number Diff line number Diff line
@@ -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]) ||