git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@3956 f3b2605a-c512-4ea7-a41b-209d697bcdaa

This commit is contained in:
sjplimp 2010-04-02 17:40:34 +00:00
parent e152796332
commit 554b0583d0
2 changed files with 14 additions and 4 deletions

View File

@ -182,7 +182,9 @@ FixBoxRelax::FixBoxRelax(LAMMPS *lmp, int narg, char **arg) :
if (dimension == 2 && (pcouple == YZ || pcouple == XZ))
error->all("Invalid fix box/relax command for a 2d simulation");
if (pcouple == XYZ && (p_flag[0] == 0 || p_flag[1] == 0 || p_flag[2] == 0))
if (pcouple == XYZ && (p_flag[0] == 0 || p_flag[1] == 0))
error->all("Invalid fix box/relax command pressure settings");
if (pcouple == XYZ && dimension == 3 && p_flag[2] == 0)
error->all("Invalid fix box/relax command pressure settings");
if (pcouple == XY && (p_flag[0] == 0 || p_flag[1] == 0))
error->all("Invalid fix box/relax command pressure settings");
@ -208,8 +210,10 @@ FixBoxRelax::FixBoxRelax(LAMMPS *lmp, int narg, char **arg) :
error->all("Can not specify Pxy/Pxz/Pyz in "
"fix box/relax with non-triclinic box");
if (pcouple == XYZ &&
if (pcouple == XYZ && dimension == 3 &&
(p_target[0] != p_target[1] || p_target[0] != p_target[2]))
error->all("Invalid fix nvt/npt/nph pressure settings");
if (pcouple == XYZ && dimension == 2 && p_target[0] != p_target[1])
error->all("Invalid fix box/relax pressure settings");
if (pcouple == XY && p_target[0] != p_target[1])
error->all("Invalid fix box/relax pressure settings");

View File

@ -149,7 +149,9 @@ FixPressBerendsen::FixPressBerendsen(LAMMPS *lmp, int narg, char **arg) :
if (dimension == 2 && (pcouple == YZ || pcouple == XZ))
error->all("Invalid fix press/berendsen command for a 2d simulation");
if (pcouple == XYZ && (p_flag[0] == 0 || p_flag[1] == 0 || p_flag[2] == 0))
if (pcouple == XYZ && (p_flag[0] == 0 || p_flag[1] == 0))
error->all("Invalid fix press/berendsen command pressure settings");
if (pcouple == XYZ && dimension == 3 && p_flag[2] == 0)
error->all("Invalid fix press/berendsen command pressure settings");
if (pcouple == XY && (p_flag[0] == 0 || p_flag[1] == 0))
error->all("Invalid fix press/berendsen command pressure settings");
@ -165,11 +167,15 @@ FixPressBerendsen::FixPressBerendsen(LAMMPS *lmp, int narg, char **arg) :
if (p_flag[2] && domain->zperiodic == 0)
error->all("Cannot use fix press/berendsen on a non-periodic dimension");
if (pcouple == XYZ &&
if (pcouple == XYZ && dimension == 3 &&
(p_start[0] != p_start[1] || p_start[0] != p_start[2] ||
p_stop[0] != p_stop[1] || p_stop[0] != p_stop[2] ||
p_period[0] != p_period[1] || p_period[0] != p_period[2]))
error->all("Invalid fix press/berendsen pressure settings");
if (pcouple == XYZ && dimension == 2 &&
(p_start[0] != p_start[1] || p_stop[0] != p_stop[1] ||
p_period[0] != p_period[1]))
error->all("Invalid fix press_berendsen pressure settings");
if (pcouple == XY &&
(p_start[0] != p_start[1] || p_stop[0] != p_stop[1] ||
p_period[0] != p_period[1]))