process tilt parameters correctly and consistent with FixNH class
This commit is contained in:
@ -151,7 +151,6 @@ FixPressLangevin::FixPressLangevin(LAMMPS *lmp, int narg, char **arg) :
|
||||
iarg += 4;
|
||||
} else if (strcmp(arg[iarg], "x") == 0) {
|
||||
if (iarg + 4 > narg) utils::missing_cmd_args(FLERR, "fix press/langevin tri", error);
|
||||
if (iarg + 4 > narg) error->all(FLERR, "Illegal fix press/langevin command");
|
||||
p_start[0] = utils::numeric(FLERR, arg[iarg + 1], false, lmp);
|
||||
p_stop[0] = utils::numeric(FLERR, arg[iarg + 2], false, lmp);
|
||||
p_period[0] = utils::numeric(FLERR, arg[iarg + 3], false, lmp);
|
||||
@ -172,8 +171,8 @@ FixPressLangevin::FixPressLangevin(LAMMPS *lmp, int narg, char **arg) :
|
||||
p_flag[2] = 1;
|
||||
iarg += 4;
|
||||
if (dimension == 2)
|
||||
error->all(FLERR, "Fix press/langevin z option not allowed for a 2d simulation");
|
||||
} else if (strcmp(arg[iarg], "xy") == 0) {
|
||||
error->all(FLERR, iarg, "Fix press/langevin z option not allowed for a 2d simulation");
|
||||
} else if (strcmp(arg[iarg], "yz") == 0) {
|
||||
if (iarg + 4 > narg) utils::missing_cmd_args(FLERR, "fix press/langevin yz", error);
|
||||
p_start[3] = utils::numeric(FLERR, arg[iarg + 1], false, lmp);
|
||||
p_stop[3] = utils::numeric(FLERR, arg[iarg + 2], false, lmp);
|
||||
@ -181,7 +180,7 @@ FixPressLangevin::FixPressLangevin(LAMMPS *lmp, int narg, char **arg) :
|
||||
p_flag[3] = 1;
|
||||
iarg += 4;
|
||||
if (dimension == 2)
|
||||
error->all(FLERR, "Fix press/langevin yz option not allowed for a 2d simulation");
|
||||
error->all(FLERR, iarg, "Fix press/langevin yz option not allowed for a 2d simulation");
|
||||
|
||||
} else if (strcmp(arg[iarg], "xz") == 0) {
|
||||
if (iarg + 4 > narg) utils::missing_cmd_args(FLERR, "fix press/langevin xz", error);
|
||||
@ -191,16 +190,15 @@ FixPressLangevin::FixPressLangevin(LAMMPS *lmp, int narg, char **arg) :
|
||||
p_flag[4] = 1;
|
||||
iarg += 4;
|
||||
if (dimension == 2)
|
||||
error->all(FLERR, "Fix press/langevin zz option not allowed for a 2d simulation");
|
||||
error->all(FLERR, iarg, "Fix press/langevin zz option not allowed for a 2d simulation");
|
||||
|
||||
} else if (strcmp(arg[iarg], "yz") == 0) {
|
||||
} else if (strcmp(arg[iarg], "xy") == 0) {
|
||||
if (iarg + 4 > narg) utils::missing_cmd_args(FLERR, "fix press/langevin xy", error);
|
||||
p_start[5] = utils::numeric(FLERR, arg[iarg + 1], false, lmp);
|
||||
p_stop[5] = utils::numeric(FLERR, arg[iarg + 2], false, lmp);
|
||||
p_period[5] = utils::numeric(FLERR, arg[iarg + 3], false, lmp);
|
||||
p_flag[5] = 1;
|
||||
iarg += 4;
|
||||
if (dimension == 2) error->all(FLERR, "Invalid fix {} command for a 2d simulation", style);
|
||||
|
||||
} else if (strcmp(arg[iarg], "flip") == 0) {
|
||||
if (iarg + 2 > narg) utils::missing_cmd_args(FLERR, "fix press/langevin flip", error);
|
||||
|
||||
Reference in New Issue
Block a user