Merge pull request #1390 from ckadding/master

Fix typos in argument checking for  compute pressure/cylinder
This commit is contained in:
Axel Kohlmeyer 2019-03-28 13:44:53 -04:00 committed by GitHub
commit 74bfd78b06
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -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;