Updating error messages, small changes to doc
This commit is contained in:
@ -660,11 +660,11 @@ void BondBPMRotational::settings(int narg, char **arg)
|
||||
for (std::size_t i = 0; i < leftover_iarg.size(); i++) {
|
||||
iarg = leftover_iarg[i];
|
||||
if (strcmp(arg[iarg], "smooth") == 0) {
|
||||
if (iarg + 1 > narg) error->all(FLERR, "Illegal bond bpm command");
|
||||
if (iarg + 1 > narg) error->all(FLERR, "Illegal bond bpm command, missing option for smooth");
|
||||
smooth_flag = utils::logical(FLERR, arg[iarg + 1], false, lmp);
|
||||
i += 1;
|
||||
} else {
|
||||
error->all(FLERR, "Illegal bond_style command");
|
||||
error->all(FLERR, "Illegal bond bpm command, invalid argument {}", arg[iarg]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -296,11 +296,11 @@ void BondBPMSpring::settings(int narg, char **arg)
|
||||
for (std::size_t i = 0; i < leftover_iarg.size(); i++) {
|
||||
iarg = leftover_iarg[i];
|
||||
if (strcmp(arg[iarg], "smooth") == 0) {
|
||||
if (iarg + 1 > narg) error->all(FLERR, "Illegal bond bpm command");
|
||||
if (iarg + 1 > narg) error->all(FLERR, "Illegal bond bpm command, missing option for smooth");
|
||||
smooth_flag = utils::logical(FLERR, arg[iarg + 1], false, lmp);
|
||||
i += 1;
|
||||
} else {
|
||||
error->all(FLERR, "Illegal bond_style command");
|
||||
error->all(FLERR, "Illegal bond bpm command, invalid argument {}", arg[iarg]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -38,7 +38,7 @@ ComputeNBondAtom::ComputeNBondAtom(LAMMPS *_lmp, int narg, char **arg) :
|
||||
|
||||
if (narg == 4) {
|
||||
if (utils::strmatch(arg[3], "forward")) comm_forward = 1;
|
||||
else error->all(FLERR, "Illegal compute nbond/atom command");
|
||||
else error->all(FLERR, "Illegal compute nbond/atom argument {}", arg[3]);
|
||||
}
|
||||
|
||||
nmax = 0;
|
||||
|
||||
@ -83,7 +83,7 @@ ComputeBondLocal::ComputeBondLocal(LAMMPS *lmp, int narg, char **arg) :
|
||||
nvar++;
|
||||
} else if (arg[iarg][0] == 'b') {
|
||||
int n = atoi(&arg[iarg][1]);
|
||||
if (n <= 0) error->all(FLERR, "Invalid keyword in compute bond/local command");
|
||||
if (n <= 0) error->all(FLERR, "Invalid keyword {} in compute bond/local command", arg[iarg]);
|
||||
bstyle[nvalues] = BN;
|
||||
bindex[nvalues++] = n - 1;
|
||||
} else break;
|
||||
|
||||
@ -246,4 +246,4 @@ void FixUpdateSpecialBonds::add_created_bond(int i, int j)
|
||||
auto tag_pair = std::make_pair(atom->tag[i], atom->tag[j]);
|
||||
new_created_pairs.push_back(tag_pair);
|
||||
created_pairs.push_back(tag_pair);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user