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