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

@ -127,8 +127,8 @@ void Velocity::command(int narg, char **arg)
// create() invoked differently, so can be called externally
if (style == CREATE) {
double t_desired = force->numeric(FLERR,arg[2]);
int seed = force->inumeric(FLERR,arg[3]);
double t_desired = utils::numeric(FLERR,arg[2],false,lmp);
int seed = utils::inumeric(FLERR,arg[3],false,lmp);
create(t_desired,seed);
}
else if (style == SET) set(narg-2,&arg[2]);
@ -424,21 +424,21 @@ void Velocity::set(int /*narg*/, char **arg)
xstr = new char[n];
strcpy(xstr,&arg[0][2]);
} else if (strcmp(arg[0],"NULL") == 0) xstyle = NONE;
else vx = force->numeric(FLERR,arg[0]);
else vx = utils::numeric(FLERR,arg[0],false,lmp);
if (strstr(arg[1],"v_") == arg[1]) {
int n = strlen(&arg[1][2]) + 1;
ystr = new char[n];
strcpy(ystr,&arg[1][2]);
} else if (strcmp(arg[1],"NULL") == 0) ystyle = NONE;
else vy = force->numeric(FLERR,arg[1]);
else vy = utils::numeric(FLERR,arg[1],false,lmp);
if (strstr(arg[2],"v_") == arg[2]) {
int n = strlen(&arg[2][2]) + 1;
zstr = new char[n];
strcpy(zstr,&arg[2][2]);
} else if (strcmp(arg[2],"NULL") == 0) zstyle = NONE;
else vz = force->numeric(FLERR,arg[2]);
else vz = utils::numeric(FLERR,arg[2],false,lmp);
// set and apply scale factors
@ -578,7 +578,7 @@ void Velocity::set(int /*narg*/, char **arg)
void Velocity::scale(int /*narg*/, char **arg)
{
double t_desired = force->numeric(FLERR,arg[0]);
double t_desired = utils::numeric(FLERR,arg[0],false,lmp);
// if temperature = NULL, create a new ComputeTemp with the velocity group
@ -649,14 +649,14 @@ void Velocity::ramp(int /*narg*/, char **arg)
double v_lo,v_hi;
if (v_dim == 0) {
v_lo = xscale*force->numeric(FLERR,arg[1]);
v_hi = xscale*force->numeric(FLERR,arg[2]);
v_lo = xscale*utils::numeric(FLERR,arg[1],false,lmp);
v_hi = xscale*utils::numeric(FLERR,arg[2],false,lmp);
} else if (v_dim == 1) {
v_lo = yscale*force->numeric(FLERR,arg[1]);
v_hi = yscale*force->numeric(FLERR,arg[2]);
v_lo = yscale*utils::numeric(FLERR,arg[1],false,lmp);
v_hi = yscale*utils::numeric(FLERR,arg[2],false,lmp);
} else if (v_dim == 2) {
v_lo = zscale*force->numeric(FLERR,arg[1]);
v_hi = zscale*force->numeric(FLERR,arg[2]);
v_lo = zscale*utils::numeric(FLERR,arg[1],false,lmp);
v_hi = zscale*utils::numeric(FLERR,arg[2],false,lmp);
}
int coord_dim = 0;
@ -667,14 +667,14 @@ void Velocity::ramp(int /*narg*/, char **arg)
double coord_lo,coord_hi;
if (coord_dim == 0) {
coord_lo = xscale*force->numeric(FLERR,arg[4]);
coord_hi = xscale*force->numeric(FLERR,arg[5]);
coord_lo = xscale*utils::numeric(FLERR,arg[4],false,lmp);
coord_hi = xscale*utils::numeric(FLERR,arg[5],false,lmp);
} else if (coord_dim == 1) {
coord_lo = yscale*force->numeric(FLERR,arg[4]);
coord_hi = yscale*force->numeric(FLERR,arg[5]);
coord_lo = yscale*utils::numeric(FLERR,arg[4],false,lmp);
coord_hi = yscale*utils::numeric(FLERR,arg[5],false,lmp);
} else if (coord_dim == 2) {
coord_lo = zscale*force->numeric(FLERR,arg[4]);
coord_hi = zscale*force->numeric(FLERR,arg[5]);
coord_lo = zscale*utils::numeric(FLERR,arg[4],false,lmp);
coord_hi = zscale*utils::numeric(FLERR,arg[5],false,lmp);
}
// vramp = ramped velocity component for v_dim