improve logic and grammar of error messages
This commit is contained in:
@ -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];
|
||||
|
||||
|
||||
@ -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");
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
|
||||
@ -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");
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
|
||||
@ -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");
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
|
||||
@ -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]);
|
||||
}
|
||||
|
||||
|
||||
@ -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];
|
||||
|
||||
@ -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];
|
||||
|
||||
Reference in New Issue
Block a user