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.
This commit is contained in:
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
Reference in New Issue
Block a user