add check to disallow custom neighbor list cutoffs larger than the communication cutoff.
This commit is contained in:
@ -837,9 +837,20 @@ int Neighbor::init_pair()
|
||||
// similar to what vanilla Nbin::coord2atom() does now in atom2bin
|
||||
|
||||
if (style == Neighbor::BIN) {
|
||||
for (i = 0; i < nrequest; i++)
|
||||
for (i = 0; i < nrequest; ++i)
|
||||
if (requests[i]->occasional && requests[i]->ghost)
|
||||
error->all(FLERR,"Cannot request an occasional binned neighbor list with ghost info");
|
||||
error->all(FLERR, "Cannot request an occasional binned neighbor list with ghost info");
|
||||
}
|
||||
|
||||
// check requests with a custom neighbor list cutoff to make sure the cutoff is within
|
||||
// the communication cutoff. For perpetual lists, neighbor list skin is added later.
|
||||
|
||||
const double comm_cutoff = comm->get_comm_cutoff();
|
||||
for (i = 0; i < nrequest; ++i) {
|
||||
if (requests[i]->cut) {
|
||||
if (comm_cutoff < (requests[i]->cutoff + (requests[i]->occasional ? 0.0 : skin)))
|
||||
error->all(FLERR, "Custom neighbor list cutoff too large for communication cutoff");
|
||||
}
|
||||
}
|
||||
|
||||
// morph requests in various ways
|
||||
|
||||
Reference in New Issue
Block a user