simplify code by appling varargs messages and warnings
This commit is contained in:
@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user