expand_type_int verify->bool

This commit is contained in:
Jacob Gissinger
2024-08-18 23:05:52 -06:00
parent 1afa56e0da
commit 4c15ac99a3
10 changed files with 31 additions and 31 deletions

View File

@ -388,7 +388,7 @@ void PairE3B::coeff(int narg, char **arg)
if (narg < 4) error->all(FLERR, "There must be at least one keyword given to pair_coeff");
if (typeO_str.size() > 0)
typeO = utils::expand_type_int(FLERR, typeO_str, Atom::ATOM, lmp, 1);
typeO = utils::expand_type_int(FLERR, typeO_str, Atom::ATOM, lmp, true);
// clear setflag since coeff() called once with I,J = * *
int n = atom->ntypes;

View File

@ -441,10 +441,10 @@ void PairLJCutTIP4PLongSoft::coeff(int narg, char **arg)
// and the types are already set and the strings are empty.
if (typeO_str.size() > 0) {
typeO = utils::expand_type_int(FLERR, typeO_str, Atom::ATOM, lmp, 1);
typeH = utils::expand_type_int(FLERR, typeH_str, Atom::ATOM, lmp, 1);
typeB = utils::expand_type_int(FLERR, typeB_str, Atom::BOND, lmp, 1);
typeA = utils::expand_type_int(FLERR, typeA_str, Atom::ANGLE, lmp, 1);
typeO = utils::expand_type_int(FLERR, typeO_str, Atom::ATOM, lmp, true);
typeH = utils::expand_type_int(FLERR, typeH_str, Atom::ATOM, lmp, true);
typeB = utils::expand_type_int(FLERR, typeB_str, Atom::BOND, lmp, true);
typeA = utils::expand_type_int(FLERR, typeA_str, Atom::ANGLE, lmp, true);
}
PairLJCutCoulLongSoft::coeff(narg, arg);

View File

@ -398,10 +398,10 @@ void PairTIP4PLongSoft::coeff(int narg, char **arg)
// and the types are already set and the strings are empty.
if (typeO_str.size() > 0) {
typeO = utils::expand_type_int(FLERR, typeO_str, Atom::ATOM, lmp, 1);
typeH = utils::expand_type_int(FLERR, typeH_str, Atom::ATOM, lmp, 1);
typeB = utils::expand_type_int(FLERR, typeB_str, Atom::BOND, lmp, 1);
typeA = utils::expand_type_int(FLERR, typeA_str, Atom::ANGLE, lmp, 1);
typeO = utils::expand_type_int(FLERR, typeO_str, Atom::ATOM, lmp, true);
typeH = utils::expand_type_int(FLERR, typeH_str, Atom::ATOM, lmp, true);
typeB = utils::expand_type_int(FLERR, typeB_str, Atom::BOND, lmp, true);
typeA = utils::expand_type_int(FLERR, typeA_str, Atom::ANGLE, lmp, true);
}
PairCoulLongSoft::coeff(narg, arg);

View File

@ -455,10 +455,10 @@ void PairLJCutTIP4PLong::coeff(int narg, char **arg)
// and the types are already set and the strings are empty.
if (typeO_str.size() > 0) {
typeO = utils::expand_type_int(FLERR, typeO_str, Atom::ATOM, lmp, 1);
typeH = utils::expand_type_int(FLERR, typeH_str, Atom::ATOM, lmp, 1);
typeB = utils::expand_type_int(FLERR, typeB_str, Atom::BOND, lmp, 1);
typeA = utils::expand_type_int(FLERR, typeA_str, Atom::ANGLE, lmp, 1);
typeO = utils::expand_type_int(FLERR, typeO_str, Atom::ATOM, lmp, true);
typeH = utils::expand_type_int(FLERR, typeH_str, Atom::ATOM, lmp, true);
typeB = utils::expand_type_int(FLERR, typeB_str, Atom::BOND, lmp, true);
typeA = utils::expand_type_int(FLERR, typeA_str, Atom::ANGLE, lmp, true);
}
PairLJCutCoulLong::coeff(narg, arg);

View File

@ -1472,10 +1472,10 @@ void PairLJLongTIP4PLong::coeff(int narg, char **arg)
// and the types are already set and the strings are empty.
if (typeO_str.size() > 0) {
typeO = utils::expand_type_int(FLERR, typeO_str, Atom::ATOM, lmp, 1);
typeH = utils::expand_type_int(FLERR, typeH_str, Atom::ATOM, lmp, 1);
typeB = utils::expand_type_int(FLERR, typeB_str, Atom::BOND, lmp, 1);
typeA = utils::expand_type_int(FLERR, typeA_str, Atom::ANGLE, lmp, 1);
typeO = utils::expand_type_int(FLERR, typeO_str, Atom::ATOM, lmp, true);
typeH = utils::expand_type_int(FLERR, typeH_str, Atom::ATOM, lmp, true);
typeB = utils::expand_type_int(FLERR, typeB_str, Atom::BOND, lmp, true);
typeA = utils::expand_type_int(FLERR, typeA_str, Atom::ANGLE, lmp, true);
}
PairLJLongCoulLong::coeff(narg, arg);

View File

@ -411,10 +411,10 @@ void PairTIP4PLong::coeff(int narg, char **arg)
// and the types are already set and the strings are empty.
if (typeO_str.size() > 0) {
typeO = utils::expand_type_int(FLERR, typeO_str, Atom::ATOM, lmp, 1);
typeH = utils::expand_type_int(FLERR, typeH_str, Atom::ATOM, lmp, 1);
typeB = utils::expand_type_int(FLERR, typeB_str, Atom::BOND, lmp, 1);
typeA = utils::expand_type_int(FLERR, typeA_str, Atom::ANGLE, lmp, 1);
typeO = utils::expand_type_int(FLERR, typeO_str, Atom::ATOM, lmp, true);
typeH = utils::expand_type_int(FLERR, typeH_str, Atom::ATOM, lmp, true);
typeB = utils::expand_type_int(FLERR, typeB_str, Atom::BOND, lmp, true);
typeA = utils::expand_type_int(FLERR, typeA_str, Atom::ANGLE, lmp, true);
}
PairCoulLong::coeff(narg, arg);

View File

@ -465,10 +465,10 @@ void PairLJCutTIP4PCut::coeff(int narg, char **arg)
// and the types are already set and the strings are empty.
if (typeO_str.size() > 0) {
typeO = utils::expand_type_int(FLERR, typeO_str, Atom::ATOM, lmp, 1);
typeH = utils::expand_type_int(FLERR, typeH_str, Atom::ATOM, lmp, 1);
typeB = utils::expand_type_int(FLERR, typeB_str, Atom::BOND, lmp, 1);
typeA = utils::expand_type_int(FLERR, typeA_str, Atom::ANGLE, lmp, 1);
typeO = utils::expand_type_int(FLERR, typeO_str, Atom::ATOM, lmp, true);
typeH = utils::expand_type_int(FLERR, typeH_str, Atom::ATOM, lmp, true);
typeB = utils::expand_type_int(FLERR, typeB_str, Atom::BOND, lmp, true);
typeA = utils::expand_type_int(FLERR, typeA_str, Atom::ANGLE, lmp, true);
}
int ilo,ihi,jlo,jhi;

View File

@ -400,10 +400,10 @@ void PairTIP4PCut::coeff(int narg, char **arg)
// and the types are already set and the strings are empty.
if (typeO_str.size() > 0) {
typeO = utils::expand_type_int(FLERR, typeO_str, Atom::ATOM, lmp, 1);
typeH = utils::expand_type_int(FLERR, typeH_str, Atom::ATOM, lmp, 1);
typeB = utils::expand_type_int(FLERR, typeB_str, Atom::BOND, lmp, 1);
typeA = utils::expand_type_int(FLERR, typeA_str, Atom::ANGLE, lmp, 1);
typeO = utils::expand_type_int(FLERR, typeO_str, Atom::ATOM, lmp, true);
typeH = utils::expand_type_int(FLERR, typeH_str, Atom::ATOM, lmp, true);
typeB = utils::expand_type_int(FLERR, typeB_str, Atom::BOND, lmp, true);
typeA = utils::expand_type_int(FLERR, typeA_str, Atom::ANGLE, lmp, true);
}
int ilo,ihi,jlo,jhi;

View File

@ -1000,7 +1000,7 @@ char *utils::expand_type(const char *file, int line, const std::string &str, int
------------------------------------------------------------------------- */
int utils::expand_type_int(const char *file, int line, const std::string &str, int mode,
LAMMPS *lmp, int verify)
LAMMPS *lmp, bool verify)
{
char *typestr = expand_type(file, line, str, mode, lmp);
int type = inumeric(file, line, typestr ? typestr : str, false, lmp);

View File

@ -409,7 +409,7 @@ This functions adds the following case to :cpp:func:`utils::bounds() <LAMMPS_NS:
*
* This function has the same arguments as expand_type() but returns an integer value */
int expand_type_int(const char *file, int line, const std::string &str, int mode, LAMMPS *lmp, int verify = 0);
int expand_type_int(const char *file, int line, const std::string &str, int mode, LAMMPS *lmp, bool verify = false);
/*! Check grid reference for valid Compute or Fix which produces per-grid data
*