diff --git a/src/GRANULAR/fix_wall_gran.cpp b/src/GRANULAR/fix_wall_gran.cpp index f9840c9d5e..11cf0a9bc9 100644 --- a/src/GRANULAR/fix_wall_gran.cpp +++ b/src/GRANULAR/fix_wall_gran.cpp @@ -323,10 +323,10 @@ FixWallGran::FixWallGran(LAMMPS *lmp, int narg, char **arg) : if (tangential_model == TANGENTIAL_MINDLIN_RESCALE || tangential_model == TANGENTIAL_MINDLIN_RESCALE_FORCE) size_history += 1; - if (limit_damping and normal_model == JKR) + if (limit_damping && normal_model == JKR) error->all(FLERR,"Illegal pair_coeff command, " "cannot limit damping with JRK model"); - if (limit_damping and normal_model == DMT) + if (limit_damping && normal_model == DMT) error->all(FLERR,"Illegal pair_coeff command, " "Cannot limit damping with DMT model"); } @@ -794,7 +794,7 @@ void FixWallGran::hooke(double rsq, double dx, double dy, double dz, damp = meff*gamman*vnnr*rsqinv; ccel = kn*(radius-r)*rinv - damp; - if (limit_damping and ccel < 0.0) ccel = 0.0; + if (limit_damping && ccel < 0.0) ccel = 0.0; // relative velocities @@ -887,7 +887,7 @@ void FixWallGran::hooke_history(double rsq, double dx, double dy, double dz, damp = meff*gamman*vnnr*rsqinv; ccel = kn*(radius-r)*rinv - damp; - if (limit_damping and ccel < 0.0) ccel = 0.0; + if (limit_damping && ccel < 0.0) ccel = 0.0; // relative velocities @@ -1019,7 +1019,7 @@ void FixWallGran::hertz_history(double rsq, double dx, double dy, double dz, if (rwall == 0.0) polyhertz = sqrt((radius-r)*radius); else polyhertz = sqrt((radius-r)*radius*rwall/(rwall+radius)); ccel *= polyhertz; - if (limit_damping and ccel < 0.0) ccel = 0.0; + if (limit_damping && ccel < 0.0) ccel = 0.0; // relative velocities @@ -1214,7 +1214,7 @@ void FixWallGran::granular(double rsq, double dx, double dy, double dz, Fdamp = -damp_normal_prefactor*vnnr; Fntot = Fne + Fdamp; - if (limit_damping and Fntot < 0.0) Fntot = 0.0; + if (limit_damping && Fntot < 0.0) Fntot = 0.0; //**************************************** // tangential force, including history effects diff --git a/src/GRANULAR/pair_gran_hertz_history.cpp b/src/GRANULAR/pair_gran_hertz_history.cpp index be2a3c2558..e40a9be2bd 100644 --- a/src/GRANULAR/pair_gran_hertz_history.cpp +++ b/src/GRANULAR/pair_gran_hertz_history.cpp @@ -181,7 +181,7 @@ void PairGranHertzHistory::compute(int eflag, int vflag) ccel = kn*(radsum-r)*rinv - damp; polyhertz = sqrt((radsum-r)*radi*radj / radsum); ccel *= polyhertz; - if (limit_damping and ccel < 0.0) ccel = 0.0; + if (limit_damping && ccel < 0.0) ccel = 0.0; // relative velocities @@ -278,7 +278,7 @@ void PairGranHertzHistory::compute(int eflag, int vflag) void PairGranHertzHistory::settings(int narg, char **arg) { - if (narg != 6 and narg != 7) error->all(FLERR,"Illegal pair_style command"); + if (narg != 6 && narg != 7) error->all(FLERR,"Illegal pair_style command"); kn = utils::numeric(FLERR,arg[0],false,lmp); if (strcmp(arg[1],"NULL") == 0) kt = kn * 2.0/7.0; @@ -395,7 +395,7 @@ double PairGranHertzHistory::single(int i, int j, int /*itype*/, int /*jtype*/, ccel = kn*(radsum-r)*rinv - damp; polyhertz = sqrt((radsum-r)*radi*radj / radsum); ccel *= polyhertz; - if (limit_damping and ccel < 0.0) ccel = 0.0; + if (limit_damping && ccel < 0.0) ccel = 0.0; // relative velocities diff --git a/src/GRANULAR/pair_gran_hooke.cpp b/src/GRANULAR/pair_gran_hooke.cpp index c28bbd007f..0f45fadca9 100644 --- a/src/GRANULAR/pair_gran_hooke.cpp +++ b/src/GRANULAR/pair_gran_hooke.cpp @@ -158,7 +158,7 @@ void PairGranHooke::compute(int eflag, int vflag) damp = meff*gamman*vnnr*rsqinv; ccel = kn*(radsum-r)*rinv - damp; - if (limit_damping and ccel < 0.0) ccel = 0.0; + if (limit_damping && ccel < 0.0) ccel = 0.0; // relative velocities @@ -300,7 +300,7 @@ double PairGranHooke::single(int i, int j, int /*itype*/, int /*jtype*/, double damp = meff*gamman*vnnr*rsqinv; ccel = kn*(radsum-r)*rinv - damp; - if (limit_damping and ccel < 0.0) ccel = 0.0; + if (limit_damping && ccel < 0.0) ccel = 0.0; // relative velocities diff --git a/src/GRANULAR/pair_gran_hooke_history.cpp b/src/GRANULAR/pair_gran_hooke_history.cpp index 4f7a6e20ec..48c30c761e 100644 --- a/src/GRANULAR/pair_gran_hooke_history.cpp +++ b/src/GRANULAR/pair_gran_hooke_history.cpp @@ -237,7 +237,7 @@ void PairGranHookeHistory::compute(int eflag, int vflag) damp = meff*gamman*vnnr*rsqinv; ccel = kn*(radsum-r)*rinv - damp; - if (limit_damping and ccel < 0.0) ccel = 0.0; + if (limit_damping && ccel < 0.0) ccel = 0.0; // relative velocities @@ -357,7 +357,7 @@ void PairGranHookeHistory::allocate() void PairGranHookeHistory::settings(int narg, char **arg) { - if (narg != 6 and narg != 7) error->all(FLERR,"Illegal pair_style command"); + if (narg != 6 && narg != 7) error->all(FLERR,"Illegal pair_style command"); kn = utils::numeric(FLERR,arg[0],false,lmp); if (strcmp(arg[1],"NULL") == 0) kt = kn * 2.0/7.0; @@ -693,7 +693,7 @@ double PairGranHookeHistory::single(int i, int j, int /*itype*/, int /*jtype*/, damp = meff*gamman*vnnr*rsqinv; ccel = kn*(radsum-r)*rinv - damp; - if(limit_damping and ccel < 0.0) ccel = 0.0; + if(limit_damping && ccel < 0.0) ccel = 0.0; // relative velocities diff --git a/src/GRANULAR/pair_granular.cpp b/src/GRANULAR/pair_granular.cpp index 653d5c70a1..e787e305ff 100644 --- a/src/GRANULAR/pair_granular.cpp +++ b/src/GRANULAR/pair_granular.cpp @@ -371,7 +371,7 @@ void PairGranular::compute(int eflag, int vflag) Fdamp = -damp_normal_prefactor*vnnr; Fntot = Fne + Fdamp; - if (limit_damping[itype][jtype] and Fntot < 0.0) Fntot = 0.0; + if (limit_damping[itype][jtype] && Fntot < 0.0) Fntot = 0.0; //**************************************** // tangential force, including history effects @@ -988,11 +988,11 @@ void PairGranular::coeff(int narg, char **arg) 27.467*powint(cor,4)-18.022*powint(cor,5)+4.8218*powint(cor,6); } else damp = normal_coeffs_one[1]; - if (ld_flag and normal_model_one == JKR) + if (ld_flag && normal_model_one == JKR) error->all(FLERR,"Illegal pair_coeff command, " "Cannot limit damping with JKR model"); - if (ld_flag and normal_model_one == DMT) + if (ld_flag && normal_model_one == DMT) error->all(FLERR,"Illegal pair_coeff command, " "Cannot limit damping with DMT model"); @@ -1547,7 +1547,7 @@ double PairGranular::single(int i, int j, int itype, int jtype, Fdamp = -damp_normal_prefactor*vnnr; Fntot = Fne + Fdamp; - if (limit_damping[itype][jtype] and Fntot < 0.0) Fntot = 0.0; + if (limit_damping[itype][jtype] && Fntot < 0.0) Fntot = 0.0; jnum = list->numneigh[i]; jlist = list->firstneigh[i]; diff --git a/src/KOKKOS/pair_gran_hooke_history_kokkos.cpp b/src/KOKKOS/pair_gran_hooke_history_kokkos.cpp index 8d853b7dae..95be9843b9 100644 --- a/src/KOKKOS/pair_gran_hooke_history_kokkos.cpp +++ b/src/KOKKOS/pair_gran_hooke_history_kokkos.cpp @@ -392,7 +392,7 @@ void PairGranHookeHistoryKokkos::operator()(TagPairGranHookeHistoryC F_FLOAT damp = meff*gamman*vnnr*rsqinv; F_FLOAT ccel = kn*(radsum-r)*rinv - damp; - if(limit_damping & ccel < 0.0) ccel = 0.0; + if(limit_damping && ccel < 0.0) ccel = 0.0; // relative velocities