From ec0984b642e64155127f44fb3a0e5e431e86c360 Mon Sep 17 00:00:00 2001 From: athomps Date: Thu, 12 Apr 2007 16:38:19 +0000 Subject: [PATCH] Relaxed allowable range for slab parameter git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@475 f3b2605a-c512-4ea7-a41b-209d697bcdaa --- src/kspace.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/kspace.cpp b/src/kspace.cpp index 216e74474a..8f25b718f2 100644 --- a/src/kspace.cpp +++ b/src/kspace.cpp @@ -15,6 +15,7 @@ #include "string.h" #include "kspace.h" #include "error.h" +#include "comm.h" using namespace LAMMPS_NS; @@ -60,7 +61,9 @@ void KSpace::modify_params(int narg, char **arg) if (iarg+2 > narg) error->all("Illegal kspace_modify command"); slab_volfactor = atof(arg[iarg+1]); iarg += 2; - if (slab_volfactor < 2.0) error->all("Bad slab parameter"); + if (slab_volfactor <= 1.0) error->all("Bad slab parameter"); + if (slab_volfactor < 2.0 && comm->me == 0) + error->warning("Slab parameter < 2.0 may cause unphysical behavior"); slabflag = 1; } else error->all("Illegal kspace_modify command"); }