From 196b8c6eabda5c8f772dc05cd52eb161c3f97fd9 Mon Sep 17 00:00:00 2001 From: ckadding Date: Thu, 28 Mar 2019 11:53:32 -0400 Subject: [PATCH] Fix typos in error checking --- src/USER-MISC/compute_pressure_cylinder.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/USER-MISC/compute_pressure_cylinder.cpp b/src/USER-MISC/compute_pressure_cylinder.cpp index 6fcd343e38..c250eaf677 100644 --- a/src/USER-MISC/compute_pressure_cylinder.cpp +++ b/src/USER-MISC/compute_pressure_cylinder.cpp @@ -63,7 +63,7 @@ ComputePressureCyl::ComputePressureCyl(LAMMPS *lmp, int narg, char **arg) : Rmax=force->numeric(FLERR,arg[5]); bin_width=force->numeric(FLERR,arg[6]); - if ((bin_width <= 0.0) || (bin_width < Rmax)) + if ((bin_width <= 0.0) || (bin_width > Rmax)) error->all(FLERR,"Illegal compute pressure/cylinder command"); if ((zhi < zlo) || ((zhi-zlo) < bin_width)) error->all(FLERR,"Illegal compute pressure/cylinder command"); @@ -76,7 +76,7 @@ ComputePressureCyl::ComputePressureCyl(LAMMPS *lmp, int narg, char **arg) : // NOTE: at 2^22 = 4.2M bins, we will be close to exhausting allocatable // memory on a 32-bit environment. so we use this as an upper limit. - if ((nbins < 1) || (nzbins < 1) || (nbins > 2>>22) || (nbins > 2>>22)) + if ((nbins < 1) || (nzbins < 1) || (nbins > 2<<22) || (nzbins > 2<<22)) error->all(FLERR,"Illegal compute pressure/cylinder command"); array_flag=1;