Relaxed allowable range for slab parameter

git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@475 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
athomps
2007-04-12 16:38:19 +00:00
parent 86594bcc75
commit ec0984b642

View File

@ -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");
}