expand_type_int verify->bool
This commit is contained in:
@ -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;
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user