simplify code by appling varargs messages and warnings

This commit is contained in:
Axel Kohlmeyer
2021-05-05 18:19:12 -04:00
parent 8fd0595f1b
commit 22e93468d6
48 changed files with 162 additions and 181 deletions

View File

@ -655,18 +655,16 @@ double Comm::get_comm_cutoff()
maxcommcutoff = MAX(maxcommcutoff,maxbondcutoff);
} else {
if ((me == 0) && (maxbondcutoff > maxcommcutoff))
error->warning(FLERR,fmt::format("Communication cutoff {} is shorter "
"than a bond length based estimate of "
"{}. This may lead to errors.",
maxcommcutoff,maxbondcutoff));
error->warning(FLERR,"Communication cutoff {} is shorter than a bond "
"length based estimate of {}. This may lead to errors.",
maxcommcutoff,maxbondcutoff);
}
// print warning if neighborlist cutoff overrides user cutoff
if ((me == 0) && (update->setupflag == 1)) {
if ((cutghostuser > 0.0) && (maxcommcutoff > cutghostuser))
error->warning(FLERR,fmt::format("Communication cutoff adjusted to {}",
maxcommcutoff));
error->warning(FLERR,"Communication cutoff adjusted to {}",maxcommcutoff);
}
return maxcommcutoff;