Switching logical operators to match preferred style
This commit is contained in:
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
|
||||
@ -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];
|
||||
|
||||
@ -392,7 +392,7 @@ void PairGranHookeHistoryKokkos<DeviceType>::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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user