Commit baa7b705 authored by Axel Kohlmeyer's avatar Axel Kohlmeyer
Browse files

improve logic and grammar of error messages

parent 2d12260a
Loading
Loading
Loading
Loading
+7 −5
Original line number Diff line number Diff line
@@ -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,7 +263,8 @@ 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 "
  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];

+1 −1
Original line number Diff line number Diff line
@@ -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");
}

/* ----------------------------------------------------------------------
+1 −1
Original line number Diff line number Diff line
@@ -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");
}

/* ----------------------------------------------------------------------
+1 −1
Original line number Diff line number Diff line
@@ -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");
}

/* ----------------------------------------------------------------------
+1 −1
Original line number Diff line number Diff line
@@ -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]);
}

Loading