improve error messages for incorrect/inconsistent table data

This commit is contained in:
Axel Kohlmeyer
2021-08-24 22:20:23 -04:00
parent ccbf39d2c9
commit d79c42ac41

View File

@ -291,9 +291,8 @@ void PairTable::coeff(int narg, char **arg)
rlo = tb->rlo;
rhi = tb->rhi;
}
if (tb->cut <= rlo || tb->cut > rhi)
error->all(FLERR,"Invalid pair table cutoff");
if (rlo <= 0.0) error->all(FLERR,"Invalid pair table cutoff");
if (tb->cut <= rlo || tb->cut > rhi) error->all(FLERR, "Pair table cutoff outside of table");
if (rlo <= 0.0) error->all(FLERR, "Invalid pair table lower boundary");
// match = 1 if don't need to spline read-in tables
// this is only the case if r values needed by final tables