improve logic and grammar of error messages

This commit is contained in:
Axel Kohlmeyer
2018-11-06 22:13:38 -05:00
parent 2d12260ade
commit baa7b705b8
7 changed files with 15 additions and 13 deletions

View File

@ -238,8 +238,9 @@ void PairSDPDTaitwaterIsothermal::allocate () {
------------------------------------------------------------------------- */
void PairSDPDTaitwaterIsothermal::settings (int narg, char **arg) {
if (narg != 2 && narg != 3) error->all (FLERR, "Illegal number of setting "
"arguments for pair_style sdpd/taitwater/morris/isothermal");
if (narg != 2 && narg != 3)
error->all (FLERR, "Illegal number of arguments for "
"pair_style sdpd/taitwater/morris/isothermal");
temperature = force->numeric (FLERR, arg[0]);
viscosity = force->numeric (FLERR, arg[1]);
@ -262,8 +263,9 @@ void PairSDPDTaitwaterIsothermal::settings (int narg, char **arg) {
------------------------------------------------------------------------- */
void PairSDPDTaitwaterIsothermal::coeff (int narg, char **arg) {
if (narg != 5) error->all (FLERR, "Incorrect args for pair_style "
"sph/taitwater/morris coefficients");
if (narg != 5)
error->all (FLERR, "Incorrect args for pair_style "
"sph/taitwater/morris coefficients");
if (!allocated) allocate();
@ -303,7 +305,7 @@ void PairSDPDTaitwaterIsothermal::coeff (int narg, char **arg) {
double PairSDPDTaitwaterIsothermal::init_one (int i, int j) {
if (setflag[i][j] == 0)
error->all(FLERR,"Not all pair sph/taitwater/morris coeffs are not set");
error->all(FLERR,"Not all pair sph/taitwater/morris coeffs are set");
cut[j][i] = cut[i][j];

View File

@ -158,7 +158,7 @@ void PairSPHHeatConduction::allocate() {
void PairSPHHeatConduction::settings(int narg, char **/*arg*/) {
if (narg != 0)
error->all(FLERR,
"Illegal number of setting arguments for pair_style sph/heatconduction");
"Illegal number of arguments for pair_style sph/heatconduction");
}
/* ----------------------------------------------------------------------

View File

@ -200,7 +200,7 @@ void PairSPHIdealGas::allocate() {
void PairSPHIdealGas::settings(int narg, char **/*arg*/) {
if (narg != 0)
error->all(FLERR,
"Illegal number of setting arguments for pair_style sph/idealgas");
"Illegal number of arguments for pair_style sph/idealgas");
}
/* ----------------------------------------------------------------------

View File

@ -207,7 +207,7 @@ void PairSPHLJ::allocate() {
void PairSPHLJ::settings(int narg, char **/*arg*/) {
if (narg != 0)
error->all(FLERR,
"Illegal number of setting arguments for pair_style sph/lj");
"Illegal number of arguments for pair_style sph/lj");
}
/* ----------------------------------------------------------------------

View File

@ -228,7 +228,7 @@ void PairSPHRhoSum::allocate() {
void PairSPHRhoSum::settings(int narg, char **arg) {
if (narg != 1)
error->all(FLERR,
"Illegal number of setting arguments for pair_style sph/rhosum");
"Illegal number of arguments for pair_style sph/rhosum");
nstep = force->inumeric(FLERR,arg[0]);
}

View File

@ -228,7 +228,7 @@ void PairSPHTaitwater::allocate() {
void PairSPHTaitwater::settings(int narg, char **/*arg*/) {
if (narg != 0)
error->all(FLERR,
"Illegal number of setting arguments for pair_style sph/taitwater");
"Illegal number of arguments for pair_style sph/taitwater");
}
/* ----------------------------------------------------------------------
@ -282,7 +282,7 @@ void PairSPHTaitwater::coeff(int narg, char **arg) {
double PairSPHTaitwater::init_one(int i, int j) {
if (setflag[i][j] == 0) {
error->all(FLERR,"Not all pair sph/taitwater coeffs are set");
error->all(FLERR,"All pair sph/taitwater coeffs are set");
}
cut[j][i] = cut[i][j];

View File

@ -229,7 +229,7 @@ void PairSPHTaitwaterMorris::allocate() {
void PairSPHTaitwaterMorris::settings(int narg, char **/*arg*/) {
if (narg != 0)
error->all(FLERR,
"Illegal number of setting arguments for pair_style sph/taitwater/morris");
"Illegal number of arguments for pair_style sph/taitwater/morris");
}
/* ----------------------------------------------------------------------
@ -279,7 +279,7 @@ void PairSPHTaitwaterMorris::coeff(int narg, char **arg) {
double PairSPHTaitwaterMorris::init_one(int i, int j) {
if (setflag[i][j] == 0) {
error->all(FLERR,"Not all pair sph/taitwater/morris coeffs are not set");
error->all(FLERR,"All pair sph/taitwater/morris coeffs are not set");
}
cut[j][i] = cut[i][j];