improved error messages for some more region commands
This commit is contained in:
@ -37,11 +37,13 @@ RegCone::RegCone(LAMMPS *lmp, int narg, char **arg) :
|
||||
|
||||
// check open face settings
|
||||
|
||||
if (openflag && (open_faces[3] || open_faces[4] || open_faces[5]))
|
||||
error->all(FLERR,"Invalid region cone open setting");
|
||||
if (openflag)
|
||||
for (int i=3; i<6; i++)
|
||||
if (open_faces[i])
|
||||
error->all(FLERR,"Illegal region cone open face: {}", i);
|
||||
|
||||
if (strcmp(arg[2],"x") != 0 && strcmp(arg[2],"y") && strcmp(arg[2],"z") != 0)
|
||||
error->all(FLERR,"Illegal region cylinder command");
|
||||
if (strcmp(arg[2],"x") != 0 && strcmp(arg[2],"y") != 0 && strcmp(arg[2],"z") != 0)
|
||||
error->all(FLERR,"Illegal region cone axis: {}", arg[2]);
|
||||
axis = arg[2][0];
|
||||
|
||||
if (axis == 'x') {
|
||||
|
||||
@ -27,9 +27,9 @@ RegIntersect::RegIntersect(LAMMPS *lmp, int narg, char **arg) :
|
||||
{
|
||||
nregion = 0;
|
||||
|
||||
if (narg < 5) error->all(FLERR, "Illegal region command");
|
||||
if (narg < 5) error->all(FLERR, "Illegal region intersect {} arguments 5 expected");
|
||||
int n = utils::inumeric(FLERR, arg[2], false, lmp);
|
||||
if (n < 2) error->all(FLERR, "Illegal region command");
|
||||
if (n < 2) error->all(FLERR, "Illegal region intersect n: {}", n);
|
||||
options(narg - (n + 3), &arg[n + 3]);
|
||||
|
||||
// build list of regions to intersect
|
||||
|
||||
Reference in New Issue
Block a user