diff --git a/src/ASPHERE/pair_line_lj.cpp b/src/ASPHERE/pair_line_lj.cpp index a9db2a21ca..aa0a04954f 100644 --- a/src/ASPHERE/pair_line_lj.cpp +++ b/src/ASPHERE/pair_line_lj.cpp @@ -13,15 +13,17 @@ ------------------------------------------------------------------------- */ #include "pair_line_lj.h" -#include + #include "atom.h" #include "atom_vec_line.h" -#include "force.h" -#include "neighbor.h" -#include "neigh_list.h" -#include "memory.h" #include "error.h" +#include "force.h" +#include "info.h" +#include "memory.h" +#include "neigh_list.h" +#include "neighbor.h" +#include using namespace LAMMPS_NS; @@ -414,7 +416,9 @@ void PairLineLJ::init_style() double PairLineLJ::init_one(int i, int j) { - if (setflag[i][j] == 0) error->all(FLERR,"All pair coeffs are not set"); + if (setflag[i][j] == 0) + error->all(FLERR, Error::NOLASTLINE, + "All pair coeffs are not set. Status:\n" + Info::get_pair_coeff_status(lmp)); cutsubsq[i][j] = cutsub[i][j] * cutsub[i][j]; diff --git a/src/DPD-MESO/pair_mdpd_rhosum.cpp b/src/DPD-MESO/pair_mdpd_rhosum.cpp index 0e25b16352..7526ea75d7 100644 --- a/src/DPD-MESO/pair_mdpd_rhosum.cpp +++ b/src/DPD-MESO/pair_mdpd_rhosum.cpp @@ -25,6 +25,7 @@ #include "atom.h" #include "comm.h" #include "error.h" +#include "info.h" #include "memory.h" #include "neigh_list.h" #include "neighbor.h" @@ -218,9 +219,9 @@ void PairMDPDRhoSum::coeff(int narg, char **arg) { ------------------------------------------------------------------------- */ double PairMDPDRhoSum::init_one(int i, int j) { - if (setflag[i][j] == 0) { - error->all(FLERR,"All pair mdpd/rhosum coeffs are not set"); - } + if (setflag[i][j] == 0) + error->all(FLERR, Error::NOLASTLINE, "All pair mdpd/rhosum coeffs are not set. Status:\n" + + Info::get_pair_coeff_status(lmp)); cut[j][i] = cut[i][j]; diff --git a/src/EXTRA-PAIR/pair_born_coul_dsf.cpp b/src/EXTRA-PAIR/pair_born_coul_dsf.cpp index e22b40c598..b7ca3ae841 100644 --- a/src/EXTRA-PAIR/pair_born_coul_dsf.cpp +++ b/src/EXTRA-PAIR/pair_born_coul_dsf.cpp @@ -279,7 +279,7 @@ void PairBornCoulDSF::coeff(int narg, char **arg) void PairBornCoulDSF::init_style() { if (!atom->q_flag) - error->all(FLERR,"Pair style born/coul/dsf requires atom attribute q"); + error->all(FLERR, Error::NOLASTLINE, "Pair style born/coul/dsf requires atom attribute q"); neighbor->add_request(this); @@ -296,7 +296,9 @@ void PairBornCoulDSF::init_style() double PairBornCoulDSF::init_one(int i, int j) { - if (setflag[i][j] == 0) error->all(FLERR,"All pair coeffs are not set"); + if (setflag[i][j] == 0) + error->all(FLERR, Error::NOLASTLINE, + "All pair coeffs are not set. Status:\n" + Info::get_pair_coeff_status(lmp)); double cut = MAX(cut_lj[i][j],cut_coul); cut_ljsq[i][j] = cut_lj[i][j] * cut_lj[i][j]; diff --git a/src/RHEO/pair_rheo.cpp b/src/RHEO/pair_rheo.cpp index 5e06c45a3c..be2dfc6ecf 100644 --- a/src/RHEO/pair_rheo.cpp +++ b/src/RHEO/pair_rheo.cpp @@ -28,6 +28,7 @@ #include "fix_rheo.h" #include "fix_rheo_pressure.h" #include "force.h" +#include "info.h" #include "math_extra.h" #include "memory.h" #include "modify.h" @@ -527,7 +528,9 @@ void PairRHEO::setup() double PairRHEO::init_one(int i, int j) { - if (setflag[i][j] == 0) error->all(FLERR, "All pair rheo coeffs are not set"); + if (setflag[i][j] == 0) + error->all(FLERR, Error::NOLASTLINE, "All pair rheo coeffs are not set. Status:\n" + + Info::get_pair_coeff_status(lmp)); return cutk; } diff --git a/src/SPH/pair_sph_heatconduction.cpp b/src/SPH/pair_sph_heatconduction.cpp index 0bff61d190..bb163c0eff 100644 --- a/src/SPH/pair_sph_heatconduction.cpp +++ b/src/SPH/pair_sph_heatconduction.cpp @@ -18,6 +18,7 @@ #include "domain.h" #include "error.h" #include "force.h" +#include "info.h" #include "memory.h" #include "neigh_list.h" @@ -204,9 +205,10 @@ void PairSPHHeatConduction::coeff(int narg, char **arg) double PairSPHHeatConduction::init_one(int i, int j) { - if (setflag[i][j] == 0) { - error->all(FLERR,"All pair sph/heatconduction coeffs are not set"); - } + if (setflag[i][j] == 0) + error->all(FLERR, Error::NOLASTLINE, + "All pair sph/heatconduction coeffs are not set. Status:\n" + + Info::get_pair_coeff_status(lmp)); cut[j][i] = cut[i][j]; alpha[j][i] = alpha[i][j]; diff --git a/src/SPH/pair_sph_idealgas.cpp b/src/SPH/pair_sph_idealgas.cpp index 97cbda2ab3..963579aee3 100644 --- a/src/SPH/pair_sph_idealgas.cpp +++ b/src/SPH/pair_sph_idealgas.cpp @@ -18,6 +18,7 @@ #include "domain.h" #include "error.h" #include "force.h" +#include "info.h" #include "memory.h" #include "neigh_list.h" @@ -243,9 +244,10 @@ void PairSPHIdealGas::coeff(int narg, char **arg) double PairSPHIdealGas::init_one(int i, int j) { - if (setflag[i][j] == 0) { - error->all(FLERR,"All pair sph/idealgas coeffs are not set"); - } + if (setflag[i][j] == 0) + error->all(FLERR, Error::NOLASTLINE, + "All pair sph/idealgas coeffs are not set. Status:\n" + + Info::get_pair_coeff_status(lmp)); cut[j][i] = cut[i][j]; diff --git a/src/SPH/pair_sph_lj.cpp b/src/SPH/pair_sph_lj.cpp index 6f05c45638..533cd06a29 100644 --- a/src/SPH/pair_sph_lj.cpp +++ b/src/SPH/pair_sph_lj.cpp @@ -18,6 +18,7 @@ #include "domain.h" #include "error.h" #include "force.h" +#include "info.h" #include "memory.h" #include "neigh_list.h" @@ -256,7 +257,9 @@ void PairSPHLJ::coeff(int narg, char **arg) double PairSPHLJ::init_one(int i, int j) { if (setflag[i][j] == 0) { - error->all(FLERR,"All pair sph/lj coeffs are not set"); + error->all(FLERR, Error::NOLASTLINE, + "All pair sph/lj coeffs are not set. Status:\n" + + Info::get_pair_coeff_status(lmp)); } cut[j][i] = cut[i][j]; @@ -265,30 +268,6 @@ double PairSPHLJ::init_one(int i, int j) return cut[i][j]; } -/*double PairSPHLJ::LJEOS2(double rho, double e, double cv) { - - - double T = e / cv; - if (T < 1.e-2) T = 1.e-2; - //printf("%f %f\n", T, rho); - double iT = 0.1e1 / T; - //double itpow1_4 = exp(0.25 * log(iT)); //pow(iT, 0.1e1 / 0.4e1); - double itpow1_4 = pow(iT, 0.1e1 / 0.4e1); - double x = rho * itpow1_4; - double xsq = x * x; - double xpow3 = xsq * x; - double xpow4 = xsq * xsq; - double xpow9 = xpow3 * xpow3 * xpow3; - - - return (0.1e1 + rho * (0.3629e1 + 0.7264e1 * x + 0.104925e2 * xsq + 0.11460e2 - * xpow3 + 0.21760e1 * xpow9 - itpow1_4 * itpow1_4 * (0.5369e1 + 0.13160e2 - * x + 0.18525e2 * xsq - 0.17076e2 * xpow3 + 0.9320e1 * xpow4) + iT - * (-0.3492e1 + 0.18698e2 * x - 0.35505e2 * xsq + 0.31816e2 * xpow3 - - 0.11195e2 * xpow4)) * itpow1_4) * rho * T; -}*/ - - /* --------------------------------------------------------------------------------------------- */ /* Lennard-Jones EOS, Francis H. Ree diff --git a/src/SPH/pair_sph_rhosum.cpp b/src/SPH/pair_sph_rhosum.cpp index 97062b16c1..e4c2b7c918 100644 --- a/src/SPH/pair_sph_rhosum.cpp +++ b/src/SPH/pair_sph_rhosum.cpp @@ -18,6 +18,7 @@ #include "comm.h" #include "domain.h" #include "error.h" +#include "info.h" #include "memory.h" #include "neigh_list.h" #include "neighbor.h" @@ -30,7 +31,8 @@ using namespace LAMMPS_NS; PairSPHRhoSum::PairSPHRhoSum(LAMMPS *lmp) : Pair(lmp) { if (atom->rho_flag != 1) - error->all(FLERR, "Pair sph/rhosum requires atom attribute density, e.g. in atom_style sph"); + error->all(FLERR, Error::NOLASTLINE, + "Pair sph/rhosum requires atom attribute density, e.g. in atom_style sph"); restartinfo = 0; @@ -206,7 +208,7 @@ void PairSPHRhoSum::allocate() void PairSPHRhoSum::settings(int narg, char **arg) { if (narg != 1) - error->all(FLERR, + error->all(FLERR, Error::NOLASTLINE, "Illegal number of arguments for pair_style sph/rhosum"); nstep = utils::inumeric(FLERR,arg[0],false,lmp); } @@ -247,9 +249,10 @@ void PairSPHRhoSum::coeff(int narg, char **arg) double PairSPHRhoSum::init_one(int i, int j) { - if (setflag[i][j] == 0) { - error->all(FLERR,"All pair sph/rhosum coeffs are not set"); - } + if (setflag[i][j] == 0) + error->all(FLERR, Error::NOLASTLINE, + "All pair sph/rhosum coeffs are not set. Status:\n" + + Info::get_pair_coeff_status(lmp)); cut[j][i] = cut[i][j]; diff --git a/src/SPH/pair_sph_taitwater.cpp b/src/SPH/pair_sph_taitwater.cpp index 442ac833cb..892146f367 100644 --- a/src/SPH/pair_sph_taitwater.cpp +++ b/src/SPH/pair_sph_taitwater.cpp @@ -19,6 +19,7 @@ #include "domain.h" #include "error.h" #include "force.h" +#include "info.h" #include "memory.h" #include "neigh_list.h" @@ -264,7 +265,9 @@ void PairSPHTaitwater::coeff(int narg, char **arg) double PairSPHTaitwater::init_one(int i, int j) { if (setflag[i][j] == 0) { - error->all(FLERR, "All pair sph/taitwater coeffs are not set"); + error->all(FLERR, Error::NOLASTLINE, + "All pair sph/taitwater coeffs are not set. Status:\n" + + Info::get_pair_coeff_status(lmp)); } cut[j][i] = cut[i][j]; diff --git a/src/SPH/pair_sph_taitwater_morris.cpp b/src/SPH/pair_sph_taitwater_morris.cpp index 48493a1e09..e05b7c1283 100644 --- a/src/SPH/pair_sph_taitwater_morris.cpp +++ b/src/SPH/pair_sph_taitwater_morris.cpp @@ -19,6 +19,7 @@ #include "domain.h" #include "error.h" #include "force.h" +#include "info.h" #include "memory.h" #include "neigh_list.h" @@ -31,7 +32,8 @@ using namespace LAMMPS_NS; PairSPHTaitwaterMorris::PairSPHTaitwaterMorris(LAMMPS *lmp) : Pair(lmp) { if ((atom->esph_flag != 1) || (atom->rho_flag != 1) || (atom->vest_flag != 1)) - error->all(FLERR, "Pair sph/taitwater/morris requires atom attributes energy, density, and velocity estimates, e.g. in atom_style sph"); + error->all(FLERR, Error::NOLASTLINE, "Pair sph/taitwater/morris requires atom attributes " + "energy, density, and velocity estimates, e.g. in atom_style sph"); restartinfo = 0; first = 1; @@ -214,7 +216,7 @@ void PairSPHTaitwaterMorris::allocate() void PairSPHTaitwaterMorris::settings(int narg, char **/*arg*/) { if (narg != 0) - error->all(FLERR, + error->all(FLERR, Error::NOLASTLINE, "Illegal number of arguments for pair_style sph/taitwater/morris"); } @@ -265,7 +267,9 @@ void PairSPHTaitwaterMorris::coeff(int narg, char **arg) double PairSPHTaitwaterMorris::init_one(int i, int j) { if (setflag[i][j] == 0) { - error->all(FLERR,"All pair sph/taitwater/morris coeffs are not set"); + error->all(FLERR, Error::NOLASTLINE, + "All pair sph/taitwater/morris coeffs are not set. Status:\n" + + Info::get_pair_coeff_status(lmp)); } cut[j][i] = cut[i][j]; diff --git a/src/angle.cpp b/src/angle.cpp index ccb53dc84f..2bbe8eb129 100644 --- a/src/angle.cpp +++ b/src/angle.cpp @@ -17,6 +17,7 @@ #include "comm.h" #include "error.h" #include "force.h" +#include "info.h" #include "math_const.h" #include "memory.h" #include "suffix.h" @@ -70,9 +71,13 @@ Angle::~Angle() void Angle::init() { - if (!allocated && atom->nangletypes) error->all(FLERR, "Angle coeffs are not set"); + if (!allocated && atom->nangletypes) + error->all(FLERR, Error::NOLASTLINE, + "Angle coeffs are not set. Status:\n" + Info::get_angle_coeff_status(lmp)); for (int i = 1; i <= atom->nangletypes; i++) - if (setflag[i] == 0) error->all(FLERR, "All angle coeffs are not set"); + if (setflag[i] == 0) + error->all(FLERR, Error::NOLASTLINE, + "All angle coeffs are not set. Status:\n" + Info::get_angle_coeff_status(lmp)); init_style(); } diff --git a/src/bond.cpp b/src/bond.cpp index d42dd6fd24..802ac2b6c1 100644 --- a/src/bond.cpp +++ b/src/bond.cpp @@ -18,6 +18,7 @@ #include "comm.h" #include "error.h" #include "force.h" +#include "info.h" #include "memory.h" #include "neighbor.h" #include "safe_pointers.h" @@ -80,9 +81,13 @@ Bond::~Bond() void Bond::init() { - if (!allocated && atom->nbondtypes) error->all(FLERR, "Bond coeffs are not set"); + if (!allocated && atom->nbondtypes) + error->all(FLERR, Error::NOLASTLINE, + "Bond coeffs are not set. Status:\n" + Info::get_bond_coeff_status(lmp)); for (int i = 1; i <= atom->nbondtypes; i++) - if (setflag[i] == 0) error->all(FLERR, "All bond coeffs are not set"); + if (setflag[i] == 0) + error->all(FLERR, Error::NOLASTLINE, + "All bond coeffs are not set. Status:\n" + Info::get_bond_coeff_status(lmp)); init_style(); } diff --git a/src/dihedral.cpp b/src/dihedral.cpp index 2f591b1fc1..14b59d2542 100644 --- a/src/dihedral.cpp +++ b/src/dihedral.cpp @@ -17,6 +17,7 @@ #include "comm.h" #include "error.h" #include "force.h" +#include "info.h" #include "memory.h" #include "suffix.h" #include "update.h" @@ -68,9 +69,14 @@ Dihedral::~Dihedral() void Dihedral::init() { - if (!allocated && atom->ndihedraltypes) error->all(FLERR, "Dihedral coeffs are not set"); + if (!allocated && atom->ndihedraltypes) + error->all(FLERR, Error::NOLASTLINE, + "Dihedral coeffs are not set. Status:\n" + Info::get_dihedral_coeff_status(lmp)); for (int i = 1; i <= atom->ndihedraltypes; i++) - if (setflag[i] == 0) error->all(FLERR, "All dihedral coeffs are not set"); + if (setflag[i] == 0) + error->all(FLERR, Error::NOLASTLINE, + "All dihedral coeffs are not set. Status:\n" + + Info::get_dihedral_coeff_status(lmp)); init_style(); } diff --git a/src/improper.cpp b/src/improper.cpp index 3476bcdb50..02158dfff1 100644 --- a/src/improper.cpp +++ b/src/improper.cpp @@ -18,6 +18,7 @@ #include "comm.h" #include "error.h" #include "force.h" +#include "info.h" #include "memory.h" #include "suffix.h" #include "update.h" @@ -67,9 +68,14 @@ Improper::~Improper() void Improper::init() { - if (!allocated && atom->nimpropertypes) error->all(FLERR, "Improper coeffs are not set"); + if (!allocated && atom->nimpropertypes) + error->all(FLERR, Error::NOLASTLINE, + "Improper coeffs are not set. Status:\n" + Info::get_improper_coeff_status(lmp)); for (int i = 1; i <= atom->nimpropertypes; i++) - if (setflag[i] == 0) error->all(FLERR, "All improper coeffs are not set"); + if (setflag[i] == 0) + error->all(FLERR, Error::NOLASTLINE, + "All improper coeffs are not set. Status:\n" + + Info::get_improper_coeff_status(lmp)); init_style(); }