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

@ -419,9 +419,8 @@ bigint Thermo::lost_check()
if ((maxwarn > 0) && (warnbefore == 0) && (ntotal[1] > maxwarn)) {
warnbefore = 1;
if (comm->me == 0)
error->message(FLERR,fmt::format("WARNING: Too many warnings: {} vs {}. All "
"future warnings will be suppressed",
ntotal[1],maxwarn));
error->message(FLERR,"WARNING: Too many warnings: {} vs {}. All "
"future warnings will be suppressed",ntotal[1],maxwarn);
}
error->set_allwarn(ntotal[1]);
@ -438,13 +437,13 @@ bigint Thermo::lost_check()
if (lostflag == Thermo::ERROR)
error->all(FLERR,"Lost atoms: original {} current {}",
atom->natoms,ntotal[0]);
atom->natoms,ntotal[0]);
// warning message
if (me == 0)
error->warning(FLERR,fmt::format("Lost atoms: original {} current {}",
atom->natoms,ntotal[0]));
error->warning(FLERR,"Lost atoms: original {} current {}",
atom->natoms,ntotal[0]);
// reset total atom count