Use varargs version of Error:all() and Error::one() where applicable

This commit is contained in:
Axel Kohlmeyer
2021-04-25 21:30:51 -04:00
parent 4cbe6200d6
commit e9e0bb71b6
117 changed files with 522 additions and 524 deletions

View File

@ -116,27 +116,27 @@ void PairTable::compute(int eflag, int vflag)
if (rsq < cutsq[itype][jtype]) {
tb = &tables[tabindex[itype][jtype]];
if (rsq < tb->innersq)
error->one(FLERR,fmt::format("Pair distance < table inner cutoff: "
"ijtype {} {} dist {}",itype,jtype,sqrt(rsq)));
error->one(FLERR,"Pair distance < table inner cutoff: "
"ijtype {} {} dist {}",itype,jtype,sqrt(rsq));
if (tabstyle == LOOKUP) {
itable = static_cast<int> ((rsq - tb->innersq) * tb->invdelta);
if (itable >= tlm1)
error->one(FLERR,fmt::format("Pair distance > table outer cutoff: "
"ijtype {} {} dist {}",itype,jtype,sqrt(rsq)));
error->one(FLERR,"Pair distance > table outer cutoff: "
"ijtype {} {} dist {}",itype,jtype,sqrt(rsq));
fpair = factor_lj * tb->f[itable];
} else if (tabstyle == LINEAR) {
itable = static_cast<int> ((rsq - tb->innersq) * tb->invdelta);
if (itable >= tlm1)
error->one(FLERR,fmt::format("Pair distance > table outer cutoff: "
"ijtype {} {} dist {}",itype,jtype,sqrt(rsq)));
error->one(FLERR,"Pair distance > table outer cutoff: "
"ijtype {} {} dist {}",itype,jtype,sqrt(rsq));
fraction = (rsq - tb->rsq[itable]) * tb->invdelta;
value = tb->f[itable] + fraction*tb->df[itable];
fpair = factor_lj * value;
} else if (tabstyle == SPLINE) {
itable = static_cast<int> ((rsq - tb->innersq) * tb->invdelta);
if (itable >= tlm1)
error->one(FLERR,fmt::format("Pair distance > table outer cutoff: "
"ijtype {} {} dist {}",itype,jtype,sqrt(rsq)));
error->one(FLERR,"Pair distance > table outer cutoff: "
"ijtype {} {} dist {}",itype,jtype,sqrt(rsq));
b = (rsq - tb->rsq[itable]) * tb->invdelta;
a = 1.0 - b;
value = a * tb->f[itable] + b * tb->f[itable+1] +
@ -568,7 +568,7 @@ void PairTable::param_extract(Table *tb, char *line)
tb->fplo = values.next_double();
tb->fphi = values.next_double();
} else {
error->one(FLERR,fmt::format("Invalid keyword {} in pair table parameters", word).c_str());
error->one(FLERR,"Invalid keyword {} in pair table parameters", word);
}
}
} catch (TokenizerException &e) {