convert remaining errors to print coeff status
This commit is contained in:
@ -13,15 +13,17 @@
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include "pair_line_lj.h"
|
||||
#include <cmath>
|
||||
|
||||
#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 <cmath>
|
||||
|
||||
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];
|
||||
|
||||
|
||||
@ -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];
|
||||
|
||||
|
||||
@ -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];
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
@ -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];
|
||||
|
||||
@ -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];
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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];
|
||||
|
||||
|
||||
@ -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];
|
||||
|
||||
@ -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];
|
||||
|
||||
@ -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();
|
||||
}
|
||||
|
||||
@ -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();
|
||||
}
|
||||
|
||||
|
||||
@ -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();
|
||||
}
|
||||
|
||||
|
||||
@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user