From e883c3c2fab833e5c1a2c0428341f2baef1e3492 Mon Sep 17 00:00:00 2001 From: athomps Date: Fri, 10 Feb 2012 17:15:25 +0000 Subject: [PATCH] Updated error messages for shock package git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@7754 f3b2605a-c512-4ea7-a41b-209d697bcdaa --- src/SHOCK/fix_append_atoms.cpp | 2 +- src/SHOCK/fix_append_atoms.h | 25 +++++++++++++------------ src/SHOCK/fix_nphug.cpp | 6 +++--- src/SHOCK/fix_nphug.h | 19 ++++++++++++++----- src/SHOCK/fix_wall_piston.cpp | 4 ++-- src/SHOCK/fix_wall_piston.h | 15 +++++++++------ 6 files changed, 42 insertions(+), 29 deletions(-) diff --git a/src/SHOCK/fix_append_atoms.cpp b/src/SHOCK/fix_append_atoms.cpp index b77067b939..b2bd280dbf 100644 --- a/src/SHOCK/fix_append_atoms.cpp +++ b/src/SHOCK/fix_append_atoms.cpp @@ -70,7 +70,7 @@ FixAppendAtoms::FixAppendAtoms(LAMMPS *lmp, int narg, char **arg) : if (domain->boundary[0][0] != 3) error->all(FLERR,"Append boundary must be shrink/minimum"); } else if (strcmp(arg[iarg],"xhi") == 0) { - error->all(FLERR,"Only zhi currently implemented for append_atom"); + error->all(FLERR,"Only zhi currently implemented for append_atoms"); xhiflag = 1; iarg++; if (domain->boundary[0][1] != 3) diff --git a/src/SHOCK/fix_append_atoms.h b/src/SHOCK/fix_append_atoms.h index cdd9428405..77fb03fd27 100644 --- a/src/SHOCK/fix_append_atoms.h +++ b/src/SHOCK/fix_append_atoms.h @@ -65,39 +65,40 @@ command-line option when running LAMMPS to see the offending line. E: Only zhi currently implemented for append_atoms -UNDOCUMENTED +The face keyword must be zhi. E: Append boundary must be shrink/minimum -UNDOCUMENTED - -E: Only zhi currently implemented for append_atom - -UNDOCUMENTED +The boundary style of the face where atoms are added +must be of type m (shrink/minimum). E: Bad fix ID in fix append_atoms command -UNDOCUMENTED +The value of the fix_id for keyword spatial +must start with the suffix f_. E: Cannot use append_atoms in periodic dimension -UNDOCUMENTED +The boundary style of the face where atoms are added +can not be of type p (periodic). E: Cannot append atoms to a triclinic box -UNDOCUMENTED +The simulation box must be defined with edges alligned +with the Cartesian axes. E: Use of fix append_atoms with undefined lattice -UNDOCUMENTED +A lattice must be defined before using this fix. E: Fix ID for fix ave/spatial does not exist -Self-explanatory. +The fix_id value for the spatial keyword does +not correspond to any defined fix. E: Must define lattice to append_atoms -UNDOCUMENTED +A lattice must be defined before using this fix. U: must define lattice to append_atoms diff --git a/src/SHOCK/fix_nphug.cpp b/src/SHOCK/fix_nphug.cpp index 746498915b..ed3c8f74e2 100644 --- a/src/SHOCK/fix_nphug.cpp +++ b/src/SHOCK/fix_nphug.cpp @@ -61,7 +61,7 @@ FixNPHug::FixNPHug(LAMMPS *lmp, int narg, char **arg) : if (p_start[0] != p_stop[0] || p_start[1] != p_stop[1] || p_start[2] != p_stop[2]) - error->all(FLERR,"Invalid argument for fix nphug"); + error->all(FLERR,"Pstart and Pstop must have the same value"); // uniaxial = 0 means hydrostatic compression // uniaxial = 1 means uniaxial compression @@ -97,7 +97,7 @@ FixNPHug::FixNPHug(LAMMPS *lmp, int narg, char **arg) : uniaxial = 1; idir = 2; - } else error->all(FLERR,"Invalid argument for fix nphug"); + } else error->all(FLERR,"Specified target stress must be uniaxial or hydrostatic"); // triclinic hydrostatic compression @@ -110,7 +110,7 @@ FixNPHug::FixNPHug(LAMMPS *lmp, int narg, char **arg) : p_start[5] == 0.0 ) uniaxial = 0; - else error->all(FLERR,"Invalid argument for fix nphug"); + else error->all(FLERR,"For triclinic deformation, specified target stress must be hydrostatic"); } if (!tstat_flag) diff --git a/src/SHOCK/fix_nphug.h b/src/SHOCK/fix_nphug.h index 0cf9ea0c21..0ca169885e 100644 --- a/src/SHOCK/fix_nphug.h +++ b/src/SHOCK/fix_nphug.h @@ -62,21 +62,30 @@ class FixNPHug : public FixNH { /* ERROR/WARNING messages: -E: Invalid argument for fix nphug +E: Pstart and Pstop must have the same value -UNDOCUMENTED +Self-explanatory + +E: Specified target stress must be uniaxial or hydrostatic + +Self-explanatory + +E: For triclinic deformation, specified target stress must be hydrostatic + +Triclinic pressure control is allowed using the tri keyword, but +non-hydrostatic pressure control can not be used in this case. E: Temperature control must be used with fix nphug -UNDOCUMENTED +The temp keyword must be provided. E: Pressure control must be used with fix nphug -UNDOCUMENTED +A pressure control keyword (iso, aniso, tri, x, y, or z) must be provided. E: Potential energy ID for fix nvt/nph/npt does not exist -UNDOCUMENTED +A compute for potential energy must be defined. E: Illegal ... command diff --git a/src/SHOCK/fix_wall_piston.cpp b/src/SHOCK/fix_wall_piston.cpp index f9fc94c020..dc78fa5f03 100644 --- a/src/SHOCK/fix_wall_piston.cpp +++ b/src/SHOCK/fix_wall_piston.cpp @@ -79,7 +79,7 @@ FixWallPiston::FixWallPiston(LAMMPS *lmp, int narg, char **arg) : z0 = atof(arg[iarg+3]); iarg += 4; } else if (strcmp(arg[iarg],"temp") == 0) { - if (iarg+5 > narg) error->all(FLERR,"Illegal fix wall/pistons command"); + if (iarg+5 > narg) error->all(FLERR,"Illegal fix wall/piston command"); tempflag = 1; t_target = atof(arg[iarg+1]); t_period = atof(arg[iarg+2]); @@ -88,7 +88,7 @@ FixWallPiston::FixWallPiston(LAMMPS *lmp, int narg, char **arg) : if (t_target <= 0) error->all(FLERR,"Illegal fix wall/piston command"); if (t_period <= 0) error->all(FLERR,"Illegal fix wall/piston command"); if (t_extent <= 0) error->all(FLERR,"Illegal fix wall/piston command"); - if (tseed <= 0) error->all(FLERR,"Illegal fix wall/pistons command"); + if (tseed <= 0) error->all(FLERR,"Illegal fix wall/piston command"); randomt = new RanMars(lmp,tseed + comm->me); gfactor1 = new double[atom->ntypes+1]; gfactor2 = new double[atom->ntypes+1]; diff --git a/src/SHOCK/fix_wall_piston.h b/src/SHOCK/fix_wall_piston.h index 67d9827a3f..f7f108a9a6 100644 --- a/src/SHOCK/fix_wall_piston.h +++ b/src/SHOCK/fix_wall_piston.h @@ -55,26 +55,29 @@ command-line option when running LAMMPS to see the offending line. E: Fix wall/piston command only available at zlo -UNDOCUMENTED +The face keyword must be zlo. E: Must shrink-wrap piston boundary -UNDOCUMENTED +The boundary style of the face where the piston is +applied must be of type s (shrink-wrapped). E: Illegal fix wall/piston velocity -UNDOCUMENTED +The piston velocity must be positive. E: Cannot use wall in periodic dimension -Self-explanatory. +The boundary style of the face where atoms are added +can not be of type p (periodic). E: Use of fix wall/piston with undefined lattice -UNDOCUMENTED +A lattice must be defined before using this fix. E: NL ramp in wall/piston only implemented in zlo for now -UNDOCUMENTED +The ramp keyword can only be used for piston applied +to face zlo. */