replace calls to force->*numeric() with the corresponding utils::*numeric()

this also removes the now obsolete functions from Force
This commit is contained in:
Axel Kohlmeyer
2020-08-29 19:32:03 -04:00
parent 27b4e93bf5
commit 96d8d12a88
506 changed files with 3042 additions and 3135 deletions

View File

@ -95,15 +95,15 @@ void Set::command(int narg, char **arg)
if (strcmp(arg[iarg],"type") == 0) {
if (iarg+2 > narg) error->all(FLERR,"Illegal set command");
if (strstr(arg[iarg+1],"v_") == arg[iarg+1]) varparse(arg[iarg+1],1);
else ivalue = force->inumeric(FLERR,arg[iarg+1]);
else ivalue = utils::inumeric(FLERR,arg[iarg+1],false,lmp);
set(TYPE);
iarg += 2;
} else if (strcmp(arg[iarg],"type/fraction") == 0) {
if (iarg+4 > narg) error->all(FLERR,"Illegal set command");
newtype = force->inumeric(FLERR,arg[iarg+1]);
fraction = force->numeric(FLERR,arg[iarg+2]);
ivalue = force->inumeric(FLERR,arg[iarg+3]);
newtype = utils::inumeric(FLERR,arg[iarg+1],false,lmp);
fraction = utils::numeric(FLERR,arg[iarg+2],false,lmp);
ivalue = utils::inumeric(FLERR,arg[iarg+3],false,lmp);
if (newtype <= 0 || newtype > atom->ntypes)
error->all(FLERR,"Invalid value in set command");
if (fraction < 0.0 || fraction > 1.0)
@ -115,9 +115,9 @@ void Set::command(int narg, char **arg)
} else if (strcmp(arg[iarg],"type/ratio") == 0) {
if (iarg+4 > narg) error->all(FLERR,"Illegal set command");
newtype = force->inumeric(FLERR,arg[iarg+1]);
fraction = force->numeric(FLERR,arg[iarg+2]);
ivalue = force->inumeric(FLERR,arg[iarg+3]);
newtype = utils::inumeric(FLERR,arg[iarg+1],false,lmp);
fraction = utils::numeric(FLERR,arg[iarg+2],false,lmp);
ivalue = utils::inumeric(FLERR,arg[iarg+3],false,lmp);
if (newtype <= 0 || newtype > atom->ntypes)
error->all(FLERR,"Invalid value in set command");
if (fraction < 0.0 || fraction > 1.0)
@ -129,9 +129,9 @@ void Set::command(int narg, char **arg)
} else if (strcmp(arg[iarg],"type/subset") == 0) {
if (iarg+4 > narg) error->all(FLERR,"Illegal set command");
newtype = force->inumeric(FLERR,arg[iarg+1]);
nsubset = force->bnumeric(FLERR,arg[iarg+2]);
ivalue = force->inumeric(FLERR,arg[iarg+3]);
newtype = utils::inumeric(FLERR,arg[iarg+1],false,lmp);
nsubset = utils::bnumeric(FLERR,arg[iarg+2],false,lmp);
ivalue = utils::inumeric(FLERR,arg[iarg+3],false,lmp);
if (newtype <= 0 || newtype > atom->ntypes)
error->all(FLERR,"Invalid value in set command");
if (nsubset < 0)
@ -144,7 +144,7 @@ void Set::command(int narg, char **arg)
} else if (strcmp(arg[iarg],"mol") == 0) {
if (iarg+2 > narg) error->all(FLERR,"Illegal set command");
if (strstr(arg[iarg+1],"v_") == arg[iarg+1]) varparse(arg[iarg+1],1);
else ivalue = force->inumeric(FLERR,arg[iarg+1]);
else ivalue = utils::inumeric(FLERR,arg[iarg+1],false,lmp);
if (!atom->molecule_flag)
error->all(FLERR,"Cannot set this attribute for this atom style");
set(MOLECULE);
@ -153,49 +153,49 @@ void Set::command(int narg, char **arg)
} else if (strcmp(arg[iarg],"x") == 0) {
if (iarg+2 > narg) error->all(FLERR,"Illegal set command");
if (strstr(arg[iarg+1],"v_") == arg[iarg+1]) varparse(arg[iarg+1],1);
else dvalue = force->numeric(FLERR,arg[iarg+1]);
else dvalue = utils::numeric(FLERR,arg[iarg+1],false,lmp);
set(X);
iarg += 2;
} else if (strcmp(arg[iarg],"y") == 0) {
if (iarg+2 > narg) error->all(FLERR,"Illegal set command");
if (strstr(arg[iarg+1],"v_") == arg[iarg+1]) varparse(arg[iarg+1],1);
else dvalue = force->numeric(FLERR,arg[iarg+1]);
else dvalue = utils::numeric(FLERR,arg[iarg+1],false,lmp);
set(Y);
iarg += 2;
} else if (strcmp(arg[iarg],"z") == 0) {
if (iarg+2 > narg) error->all(FLERR,"Illegal set command");
if (strstr(arg[iarg+1],"v_") == arg[iarg+1]) varparse(arg[iarg+1],1);
else dvalue = force->numeric(FLERR,arg[iarg+1]);
else dvalue = utils::numeric(FLERR,arg[iarg+1],false,lmp);
set(Z);
iarg += 2;
} else if (strcmp(arg[iarg],"vx") == 0) {
if (iarg+2 > narg) error->all(FLERR,"Illegal set command");
if (strstr(arg[iarg+1],"v_") == arg[iarg+1]) varparse(arg[iarg+1],1);
else dvalue = force->numeric(FLERR,arg[iarg+1]);
else dvalue = utils::numeric(FLERR,arg[iarg+1],false,lmp);
set(VX);
iarg += 2;
} else if (strcmp(arg[iarg],"vy") == 0) {
if (iarg+2 > narg) error->all(FLERR,"Illegal set command");
if (strstr(arg[iarg+1],"v_") == arg[iarg+1]) varparse(arg[iarg+1],1);
else dvalue = force->numeric(FLERR,arg[iarg+1]);
else dvalue = utils::numeric(FLERR,arg[iarg+1],false,lmp);
set(VY);
iarg += 2;
} else if (strcmp(arg[iarg],"vz") == 0) {
if (iarg+2 > narg) error->all(FLERR,"Illegal set command");
if (strstr(arg[iarg+1],"v_") == arg[iarg+1]) varparse(arg[iarg+1],1);
else dvalue = force->numeric(FLERR,arg[iarg+1]);
else dvalue = utils::numeric(FLERR,arg[iarg+1],false,lmp);
set(VZ);
iarg += 2;
} else if (strcmp(arg[iarg],"charge") == 0) {
if (iarg+2 > narg) error->all(FLERR,"Illegal set command");
if (strstr(arg[iarg+1],"v_") == arg[iarg+1]) varparse(arg[iarg+1],1);
else dvalue = force->numeric(FLERR,arg[iarg+1]);
else dvalue = utils::numeric(FLERR,arg[iarg+1],false,lmp);
if (!atom->q_flag)
error->all(FLERR,"Cannot set this attribute for this atom style");
set(CHARGE);
@ -204,7 +204,7 @@ void Set::command(int narg, char **arg)
} else if (strcmp(arg[iarg],"mass") == 0) {
if (iarg+2 > narg) error->all(FLERR,"Illegal set command");
if (strstr(arg[iarg+1],"v_") == arg[iarg+1]) varparse(arg[iarg+1],1);
else dvalue = force->numeric(FLERR,arg[iarg+1]);
else dvalue = utils::numeric(FLERR,arg[iarg+1],false,lmp);
if (!atom->rmass_flag)
error->all(FLERR,"Cannot set this attribute for this atom style");
set(MASS);
@ -213,11 +213,11 @@ void Set::command(int narg, char **arg)
} else if (strcmp(arg[iarg],"shape") == 0) {
if (iarg+4 > narg) error->all(FLERR,"Illegal set command");
if (strstr(arg[iarg+1],"v_") == arg[iarg+1]) varparse(arg[iarg+1],1);
else xvalue = force->numeric(FLERR,arg[iarg+1]);
else xvalue = utils::numeric(FLERR,arg[iarg+1],false,lmp);
if (strstr(arg[iarg+2],"v_") == arg[iarg+2]) varparse(arg[iarg+2],2);
else yvalue = force->numeric(FLERR,arg[iarg+2]);
else yvalue = utils::numeric(FLERR,arg[iarg+2],false,lmp);
if (strstr(arg[iarg+3],"v_") == arg[iarg+3]) varparse(arg[iarg+3],3);
else zvalue = force->numeric(FLERR,arg[iarg+3]);
else zvalue = utils::numeric(FLERR,arg[iarg+3],false,lmp);
if (!atom->ellipsoid_flag)
error->all(FLERR,"Cannot set this attribute for this atom style");
set(SHAPE);
@ -226,7 +226,7 @@ void Set::command(int narg, char **arg)
} else if (strcmp(arg[iarg],"length") == 0) {
if (iarg+2 > narg) error->all(FLERR,"Illegal set command");
if (strstr(arg[iarg+1],"v_") == arg[iarg+1]) varparse(arg[iarg+1],1);
else dvalue = force->numeric(FLERR,arg[iarg+1]);
else dvalue = utils::numeric(FLERR,arg[iarg+1],false,lmp);
if (!atom->line_flag)
error->all(FLERR,"Cannot set this attribute for this atom style");
set(LENGTH);
@ -235,7 +235,7 @@ void Set::command(int narg, char **arg)
} else if (strcmp(arg[iarg],"tri") == 0) {
if (iarg+2 > narg) error->all(FLERR,"Illegal set command");
if (strstr(arg[iarg+1],"v_") == arg[iarg+1]) varparse(arg[iarg+1],1);
else dvalue = force->numeric(FLERR,arg[iarg+1]);
else dvalue = utils::numeric(FLERR,arg[iarg+1],false,lmp);
if (!atom->tri_flag)
error->all(FLERR,"Cannot set this attribute for this atom style");
set(TRI);
@ -244,11 +244,11 @@ void Set::command(int narg, char **arg)
} else if (strcmp(arg[iarg],"dipole") == 0) {
if (iarg+4 > narg) error->all(FLERR,"Illegal set command");
if (strstr(arg[iarg+1],"v_") == arg[iarg+1]) varparse(arg[iarg+1],1);
else xvalue = force->numeric(FLERR,arg[iarg+1]);
else xvalue = utils::numeric(FLERR,arg[iarg+1],false,lmp);
if (strstr(arg[iarg+2],"v_") == arg[iarg+2]) varparse(arg[iarg+2],2);
else yvalue = force->numeric(FLERR,arg[iarg+2]);
else yvalue = utils::numeric(FLERR,arg[iarg+2],false,lmp);
if (strstr(arg[iarg+3],"v_") == arg[iarg+3]) varparse(arg[iarg+3],3);
else zvalue = force->numeric(FLERR,arg[iarg+3]);
else zvalue = utils::numeric(FLERR,arg[iarg+3],false,lmp);
if (!atom->mu_flag)
error->all(FLERR,"Cannot set this attribute for this atom style");
set(DIPOLE);
@ -256,8 +256,8 @@ void Set::command(int narg, char **arg)
} else if (strcmp(arg[iarg],"dipole/random") == 0) {
if (iarg+3 > narg) error->all(FLERR,"Illegal set command");
ivalue = force->inumeric(FLERR,arg[iarg+1]);
dvalue = force->numeric(FLERR,arg[iarg+2]);
ivalue = utils::inumeric(FLERR,arg[iarg+1],false,lmp);
dvalue = utils::numeric(FLERR,arg[iarg+2],false,lmp);
if (!atom->mu_flag)
error->all(FLERR,"Cannot set this attribute for this atom style");
if (ivalue <= 0)
@ -270,13 +270,13 @@ void Set::command(int narg, char **arg)
} else if (strcmp(arg[iarg],"spin") == 0) {
if (iarg+4 > narg) error->all(FLERR,"Illegal set command");
if (strstr(arg[iarg+1],"v_") == arg[iarg+1]) varparse(arg[iarg+1],1);
else dvalue = force->numeric(FLERR,arg[iarg+1]);
else dvalue = utils::numeric(FLERR,arg[iarg+1],false,lmp);
if (strstr(arg[iarg+2],"v_") == arg[iarg+2]) varparse(arg[iarg+2],2);
else xvalue = force->numeric(FLERR,arg[iarg+2]);
else xvalue = utils::numeric(FLERR,arg[iarg+2],false,lmp);
if (strstr(arg[iarg+3],"v_") == arg[iarg+3]) varparse(arg[iarg+3],3);
else yvalue = force->numeric(FLERR,arg[iarg+3]);
else yvalue = utils::numeric(FLERR,arg[iarg+3],false,lmp);
if (strstr(arg[iarg+4],"v_") == arg[iarg+4]) varparse(arg[iarg+4],4);
else zvalue = force->numeric(FLERR,arg[iarg+4]);
else zvalue = utils::numeric(FLERR,arg[iarg+4],false,lmp);
if (!atom->sp_flag)
error->all(FLERR,"Cannot set this attribute for this atom style");
set(SPIN);
@ -284,8 +284,8 @@ void Set::command(int narg, char **arg)
} else if (strcmp(arg[iarg],"spin/random") == 0) {
if (iarg+3 > narg) error->all(FLERR,"Illegal set command");
ivalue = force->inumeric(FLERR,arg[iarg+1]);
dvalue = force->numeric(FLERR,arg[iarg+2]);
ivalue = utils::inumeric(FLERR,arg[iarg+1],false,lmp);
dvalue = utils::numeric(FLERR,arg[iarg+2],false,lmp);
if (!atom->sp_flag)
error->all(FLERR,"Cannot set this attribute for this atom style");
if (ivalue <= 0)
@ -298,13 +298,13 @@ void Set::command(int narg, char **arg)
} else if (strcmp(arg[iarg],"quat") == 0) {
if (iarg+5 > narg) error->all(FLERR,"Illegal set command");
if (strstr(arg[iarg+1],"v_") == arg[iarg+1]) varparse(arg[iarg+1],1);
else xvalue = force->numeric(FLERR,arg[iarg+1]);
else xvalue = utils::numeric(FLERR,arg[iarg+1],false,lmp);
if (strstr(arg[iarg+2],"v_") == arg[iarg+2]) varparse(arg[iarg+2],2);
else yvalue = force->numeric(FLERR,arg[iarg+2]);
else yvalue = utils::numeric(FLERR,arg[iarg+2],false,lmp);
if (strstr(arg[iarg+3],"v_") == arg[iarg+3]) varparse(arg[iarg+3],3);
else zvalue = force->numeric(FLERR,arg[iarg+3]);
else zvalue = utils::numeric(FLERR,arg[iarg+3],false,lmp);
if (strstr(arg[iarg+4],"v_") == arg[iarg+4]) varparse(arg[iarg+4],4);
else wvalue = force->numeric(FLERR,arg[iarg+4]);
else wvalue = utils::numeric(FLERR,arg[iarg+4],false,lmp);
if (!atom->ellipsoid_flag && !atom->tri_flag && !atom->body_flag)
error->all(FLERR,"Cannot set this attribute for this atom style");
set(QUAT);
@ -312,7 +312,7 @@ void Set::command(int narg, char **arg)
} else if (strcmp(arg[iarg],"quat/random") == 0) {
if (iarg+2 > narg) error->all(FLERR,"Illegal set command");
ivalue = force->inumeric(FLERR,arg[iarg+1]);
ivalue = utils::inumeric(FLERR,arg[iarg+1],false,lmp);
if (!atom->ellipsoid_flag && !atom->tri_flag && !atom->body_flag)
error->all(FLERR,"Cannot set this attribute for this atom style");
if (ivalue <= 0)
@ -324,7 +324,7 @@ void Set::command(int narg, char **arg)
if (iarg+2 > narg) error->all(FLERR,"Illegal set command");
if (strstr(arg[iarg+1],"v_") == arg[iarg+1]) varparse(arg[iarg+1],1);
else {
dvalue = force->numeric(FLERR,arg[iarg+1]);
dvalue = utils::numeric(FLERR,arg[iarg+1],false,lmp);
dvalue *= MY_PI/180.0;
}
if (!atom->line_flag)
@ -334,7 +334,7 @@ void Set::command(int narg, char **arg)
} else if (strcmp(arg[iarg],"theta/random") == 0) {
if (iarg+2 > narg) error->all(FLERR,"Illegal set command");
ivalue = force->inumeric(FLERR,arg[iarg+1]);
ivalue = utils::inumeric(FLERR,arg[iarg+1],false,lmp);
if (!atom->line_flag)
error->all(FLERR,"Cannot set this attribute for this atom style");
if (ivalue <= 0)
@ -345,11 +345,11 @@ void Set::command(int narg, char **arg)
} else if (strcmp(arg[iarg],"angmom") == 0) {
if (iarg+4 > narg) error->all(FLERR,"Illegal set command");
if (strstr(arg[iarg+1],"v_") == arg[iarg+1]) varparse(arg[iarg+1],1);
else xvalue = force->numeric(FLERR,arg[iarg+1]);
else xvalue = utils::numeric(FLERR,arg[iarg+1],false,lmp);
if (strstr(arg[iarg+2],"v_") == arg[iarg+2]) varparse(arg[iarg+2],2);
else yvalue = force->numeric(FLERR,arg[iarg+2]);
else yvalue = utils::numeric(FLERR,arg[iarg+2],false,lmp);
if (strstr(arg[iarg+3],"v_") == arg[iarg+3]) varparse(arg[iarg+3],3);
else zvalue = force->numeric(FLERR,arg[iarg+3]);
else zvalue = utils::numeric(FLERR,arg[iarg+3],false,lmp);
if (!atom->angmom_flag)
error->all(FLERR,"Cannot set this attribute for this atom style");
set(ANGMOM);
@ -358,11 +358,11 @@ void Set::command(int narg, char **arg)
} else if (strcmp(arg[iarg],"omega") == 0) {
if (iarg+4 > narg) error->all(FLERR,"Illegal set command");
if (strstr(arg[iarg+1],"v_") == arg[iarg+1]) varparse(arg[iarg+1],1);
else xvalue = force->numeric(FLERR,arg[iarg+1]);
else xvalue = utils::numeric(FLERR,arg[iarg+1],false,lmp);
if (strstr(arg[iarg+2],"v_") == arg[iarg+2]) varparse(arg[iarg+2],2);
else yvalue = force->numeric(FLERR,arg[iarg+2]);
else yvalue = utils::numeric(FLERR,arg[iarg+2],false,lmp);
if (strstr(arg[iarg+3],"v_") == arg[iarg+3]) varparse(arg[iarg+3],3);
else zvalue = force->numeric(FLERR,arg[iarg+3]);
else zvalue = utils::numeric(FLERR,arg[iarg+3],false,lmp);
if (!atom->omega_flag)
error->all(FLERR,"Cannot set this attribute for this atom style");
set(OMEGA);
@ -371,7 +371,7 @@ void Set::command(int narg, char **arg)
} else if (strcmp(arg[iarg],"diameter") == 0) {
if (iarg+2 > narg) error->all(FLERR,"Illegal set command");
if (strstr(arg[iarg+1],"v_") == arg[iarg+1]) varparse(arg[iarg+1],1);
else dvalue = force->numeric(FLERR,arg[iarg+1]);
else dvalue = utils::numeric(FLERR,arg[iarg+1],false,lmp);
if (!atom->radius_flag)
error->all(FLERR,"Cannot set this attribute for this atom style");
set(DIAMETER);
@ -381,7 +381,7 @@ void Set::command(int narg, char **arg)
(strcmp(arg[iarg],"density/disc") == 0)) {
if (iarg+2 > narg) error->all(FLERR,"Illegal set command");
if (strstr(arg[iarg+1],"v_") == arg[iarg+1]) varparse(arg[iarg+1],1);
else dvalue = force->numeric(FLERR,arg[iarg+1]);
else dvalue = utils::numeric(FLERR,arg[iarg+1],false,lmp);
if (!atom->rmass_flag)
error->all(FLERR,"Cannot set this attribute for this atom style");
if (dvalue <= 0.0) error->all(FLERR,"Invalid density in set command");
@ -397,7 +397,7 @@ void Set::command(int narg, char **arg)
} else if (strcmp(arg[iarg],"volume") == 0) {
if (iarg+2 > narg) error->all(FLERR,"Illegal set command");
if (strstr(arg[iarg+1],"v_") == arg[iarg+1]) varparse(arg[iarg+1],1);
else dvalue = force->numeric(FLERR,arg[iarg+1]);
else dvalue = utils::numeric(FLERR,arg[iarg+1],false,lmp);
if (!atom->vfrac_flag)
error->all(FLERR,"Cannot set this attribute for this atom style");
if (dvalue <= 0.0) error->all(FLERR,"Invalid volume in set command");
@ -410,17 +410,17 @@ void Set::command(int narg, char **arg)
if (strcmp(arg[iarg+1],"NULL") != 0) {
ximageflag = 1;
if (strstr(arg[iarg+1],"v_") == arg[iarg+1]) varparse(arg[iarg+1],1);
else ximage = force->inumeric(FLERR,arg[iarg+1]);
else ximage = utils::inumeric(FLERR,arg[iarg+1],false,lmp);
}
if (strcmp(arg[iarg+2],"NULL") != 0) {
yimageflag = 1;
if (strstr(arg[iarg+2],"v_") == arg[iarg+2]) varparse(arg[iarg+2],2);
else yimage = force->inumeric(FLERR,arg[iarg+2]);
else yimage = utils::inumeric(FLERR,arg[iarg+2],false,lmp);
}
if (strcmp(arg[iarg+3],"NULL") != 0) {
zimageflag = 1;
if (strstr(arg[iarg+3],"v_") == arg[iarg+3]) varparse(arg[iarg+3],3);
else zimage = force->inumeric(FLERR,arg[iarg+3]);
else zimage = utils::inumeric(FLERR,arg[iarg+3],false,lmp);
}
if (ximageflag && ximage && !domain->xperiodic)
error->all(FLERR,
@ -436,7 +436,7 @@ void Set::command(int narg, char **arg)
} else if (strcmp(arg[iarg],"bond") == 0) {
if (iarg+2 > narg) error->all(FLERR,"Illegal set command");
ivalue = force->inumeric(FLERR,arg[iarg+1]);
ivalue = utils::inumeric(FLERR,arg[iarg+1],false,lmp);
if (atom->avec->bonds_allow == 0)
error->all(FLERR,"Cannot set this attribute for this atom style");
if (ivalue <= 0 || ivalue > atom->nbondtypes)
@ -446,7 +446,7 @@ void Set::command(int narg, char **arg)
} else if (strcmp(arg[iarg],"angle") == 0) {
if (iarg+2 > narg) error->all(FLERR,"Illegal set command");
ivalue = force->inumeric(FLERR,arg[iarg+1]);
ivalue = utils::inumeric(FLERR,arg[iarg+1],false,lmp);
if (atom->avec->angles_allow == 0)
error->all(FLERR,"Cannot set this attribute for this atom style");
if (ivalue <= 0 || ivalue > atom->nangletypes)
@ -456,7 +456,7 @@ void Set::command(int narg, char **arg)
} else if (strcmp(arg[iarg],"dihedral") == 0) {
if (iarg+2 > narg) error->all(FLERR,"Illegal set command");
ivalue = force->inumeric(FLERR,arg[iarg+1]);
ivalue = utils::inumeric(FLERR,arg[iarg+1],false,lmp);
if (atom->avec->dihedrals_allow == 0)
error->all(FLERR,"Cannot set this attribute for this atom style");
if (ivalue <= 0 || ivalue > atom->ndihedraltypes)
@ -466,7 +466,7 @@ void Set::command(int narg, char **arg)
} else if (strcmp(arg[iarg],"improper") == 0) {
if (iarg+2 > narg) error->all(FLERR,"Illegal set command");
ivalue = force->inumeric(FLERR,arg[iarg+1]);
ivalue = utils::inumeric(FLERR,arg[iarg+1],false,lmp);
if (atom->avec->impropers_allow == 0)
error->all(FLERR,"Cannot set this attribute for this atom style");
if (ivalue <= 0 || ivalue > atom->nimpropertypes)
@ -477,7 +477,7 @@ void Set::command(int narg, char **arg)
} else if (strcmp(arg[iarg],"sph/e") == 0) {
if (iarg+2 > narg) error->all(FLERR,"Illegal set command");
if (strstr(arg[iarg+1],"v_") == arg[iarg+1]) varparse(arg[iarg+1],1);
else dvalue = force->numeric(FLERR,arg[iarg+1]);
else dvalue = utils::numeric(FLERR,arg[iarg+1],false,lmp);
if (!atom->esph_flag)
error->all(FLERR,"Cannot set meso/e for this atom style");
set(SPH_E);
@ -486,7 +486,7 @@ void Set::command(int narg, char **arg)
} else if (strcmp(arg[iarg],"sph/cv") == 0) {
if (iarg+2 > narg) error->all(FLERR,"Illegal set command");
if (strstr(arg[iarg+1],"v_") == arg[iarg+1]) varparse(arg[iarg+1],1);
else dvalue = force->numeric(FLERR,arg[iarg+1]);
else dvalue = utils::numeric(FLERR,arg[iarg+1],false,lmp);
if (!atom->cv_flag)
error->all(FLERR,"Cannot set meso/cv for this atom style");
set(SPH_CV);
@ -495,7 +495,7 @@ void Set::command(int narg, char **arg)
} else if (strcmp(arg[iarg],"sph/rho") == 0) {
if (iarg+2 > narg) error->all(FLERR,"Illegal set command");
if (strstr(arg[iarg+1],"v_") == arg[iarg+1]) varparse(arg[iarg+1],1);
else dvalue = force->numeric(FLERR,arg[iarg+1]);
else dvalue = utils::numeric(FLERR,arg[iarg+1],false,lmp);
if (!atom->rho_flag)
error->all(FLERR,"Cannot set meso/rho for this atom style");
set(SPH_RHO);
@ -506,7 +506,7 @@ void Set::command(int narg, char **arg)
if (strcmp(arg[iarg+1],"NULL") == 0) dvalue = -1.0;
else if (strstr(arg[iarg+1],"v_") == arg[iarg+1]) varparse(arg[iarg+1],1);
else {
dvalue = force->numeric(FLERR,arg[iarg+1]);
dvalue = utils::numeric(FLERR,arg[iarg+1],false,lmp);
if (dvalue < 0.0) error->all(FLERR,"Illegal set command");
}
if (!atom->edpd_flag)
@ -519,7 +519,7 @@ void Set::command(int narg, char **arg)
if (strcmp(arg[iarg+1],"NULL") == 0) dvalue = -1.0;
else if (strstr(arg[iarg+1],"v_") == arg[iarg+1]) varparse(arg[iarg+1],1);
else {
dvalue = force->numeric(FLERR,arg[iarg+1]);
dvalue = utils::numeric(FLERR,arg[iarg+1],false,lmp);
if (dvalue < 0.0) error->all(FLERR,"Illegal set command");
}
if (!atom->edpd_flag)
@ -532,8 +532,8 @@ void Set::command(int narg, char **arg)
if (strcmp(arg[iarg+1],"NULL") == 0) dvalue = -1.0;
else if (strstr(arg[iarg+1],"v_") == arg[iarg+1]) varparse(arg[iarg+1],1);
else {
cc_index = force->inumeric(FLERR,arg[iarg+1]);
dvalue = force->numeric(FLERR,arg[iarg+2]);
cc_index = utils::inumeric(FLERR,arg[iarg+1],false,lmp);
dvalue = utils::numeric(FLERR,arg[iarg+2],false,lmp);
if (cc_index < 1) error->all(FLERR,"Illegal set command");
}
if (!atom->tdpd_flag)
@ -544,7 +544,7 @@ void Set::command(int narg, char **arg)
} else if (strcmp(arg[iarg],"smd/mass/density") == 0) {
if (iarg+2 > narg) error->all(FLERR,"Illegal set command");
if (strstr(arg[iarg+1],"v_") == arg[iarg+1]) varparse(arg[iarg+1],1);
else dvalue = force->numeric(FLERR,arg[iarg+1]);
else dvalue = utils::numeric(FLERR,arg[iarg+1],false,lmp);
if (!atom->smd_flag)
error->all(FLERR,"Cannot set smd/mass/density for this atom style");
set(SMD_MASS_DENSITY);
@ -553,7 +553,7 @@ void Set::command(int narg, char **arg)
} else if (strcmp(arg[iarg],"smd/contact/radius") == 0) {
if (iarg+2 > narg) error->all(FLERR,"Illegal set command");
if (strstr(arg[iarg+1],"v_") == arg[iarg+1]) varparse(arg[iarg+1],1);
else dvalue = force->numeric(FLERR,arg[iarg+1]);
else dvalue = utils::numeric(FLERR,arg[iarg+1],false,lmp);
if (!atom->smd_flag)
error->all(FLERR,"Cannot set smd/contact/radius "
"for this atom style");
@ -565,7 +565,7 @@ void Set::command(int narg, char **arg)
if (strcmp(arg[iarg+1],"NULL") == 0) dvalue = -1.0;
else if (strstr(arg[iarg+1],"v_") == arg[iarg+1]) varparse(arg[iarg+1],1);
else {
dvalue = force->numeric(FLERR,arg[iarg+1]);
dvalue = utils::numeric(FLERR,arg[iarg+1],false,lmp);
if (dvalue < 0.0) error->all(FLERR,"Illegal set command");
}
if (!atom->dpd_flag)
@ -576,7 +576,7 @@ void Set::command(int narg, char **arg)
} else if (strstr(arg[iarg],"i_") == arg[iarg]) {
if (iarg+2 > narg) error->all(FLERR,"Illegal set command");
if (strstr(arg[iarg+1],"v_") == arg[iarg+1]) varparse(arg[iarg+1],1);
else ivalue = force->inumeric(FLERR,arg[iarg+1]);
else ivalue = utils::inumeric(FLERR,arg[iarg+1],false,lmp);
int flag;
index_custom = atom->find_custom(&arg[iarg][2],flag);
if (index_custom < 0 || flag != 0)
@ -587,7 +587,7 @@ void Set::command(int narg, char **arg)
} else if (strstr(arg[iarg],"d_") == arg[iarg]) {
if (iarg+2 > narg) error->all(FLERR,"Illegal set command");
if (strstr(arg[iarg+1],"v_") == arg[iarg+1]) varparse(arg[iarg+1],1);
else dvalue = force->numeric(FLERR,arg[iarg+1]);
else dvalue = utils::numeric(FLERR,arg[iarg+1],false,lmp);
int flag;
index_custom = atom->find_custom(&arg[iarg][2],flag);
if (index_custom < 0 || flag != 1)