diff --git a/src/compute_chunk_atom.cpp b/src/compute_chunk_atom.cpp index e7ca24d29c..d794cac47a 100644 --- a/src/compute_chunk_atom.cpp +++ b/src/compute_chunk_atom.cpp @@ -313,9 +313,14 @@ ComputeChunkAtom::ComputeChunkAtom(LAMMPS *lmp, int narg, char **arg) : error->all(FLERR,"Illegal compute chunk/atom command"); if (which == BIN2D && (delta[0] <= 0.0 || delta[1] <= 0.0)) error->all(FLERR,"Illegal compute chunk/atom command"); + if (which == BIN2D && (dim[0] == dim[1])) + error->all(FLERR,"Illegal compute chunk/atom command"); if (which == BIN3D && (delta[0] <= 0.0 || delta[1] <= 0.0 || delta[2] <= 0.0)) error->all(FLERR,"Illegal compute chunk/atom command"); + if (which == BIN3D && + (dim[0] == dim[1] || dm[1] == dim[2] || dim[0] == dim[2])) + error->all(FLERR,"Illegal compute chunk/atom command"); if (which == BINSPHERE) { if (domain->dimension == 2 && sorigin_user[2] != 0.0) error->all(FLERR,"Compute chunk/atom sphere z origin must be 0.0 for 2d");