Commit 0a2b78ac authored by Axel Kohlmeyer's avatar Axel Kohlmeyer
Browse files

rather than adjusting the communication cutoff, we just print out the minimum...

rather than adjusting the communication cutoff, we just print out the minimum value needed and error out

i suspect, this communication cutoff adjustment was included into the code before it was possible to separately set it via comm_modify. stopping with an error message printing the needed/current value is cleaner, in keeping with other modules in LAMMPS and much less problematic.
parent 473a3ebe
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -15,6 +15,7 @@ bond_style harmonic
bond_coeff      * 225.0 0.85

comm_modify vel yes
comm_modify cutoff 3.6

# must use pair hybrid, since srp bond particles
# do not interact with other atoms types
+4 −7
Original line number Diff line number Diff line
@@ -264,14 +264,11 @@ void FixSRP::setup_pre_force(int zz)
  if (cutghostmin > comm->cutghost[2])
    cutghostmin = comm->cutghost[2];

  // reset cutghost if needed
  // stop if cutghost is insufficient
  if (cutneighmax_srp > cutghostmin){
    if(comm->me == 0){
      sprintf(str, "Extending ghost comm cutoff. New %f, old %f.", cutneighmax_srp, cutghostmin);
      error->message(FLERR,str);
    }
    // cutghost updated by comm->setup
    comm->cutghostuser = cutneighmax_srp;
    sprintf(str, "Communication cutoff too small for fix srp. "
            "Need %f, current %f.", cutneighmax_srp, cutghostmin);
    error->all(FLERR,str);
  }

  // assign tags for new atoms, update map