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

@ -300,7 +300,7 @@ void Comm::modify_params(int narg, char **arg)
if (mode == Comm::MULTI)
error->all(FLERR,
"Use cutoff/multi keyword to set cutoff in multi mode");
cutghostuser = force->numeric(FLERR,arg[iarg+1]);
cutghostuser = utils::numeric(FLERR,arg[iarg+1],false,lmp);
if (cutghostuser < 0.0)
error->all(FLERR,"Invalid cutoff in comm_modify command");
iarg += 2;
@ -321,7 +321,7 @@ void Comm::modify_params(int narg, char **arg)
cutusermulti[i] = -1.0;
}
utils::bounds(FLERR,arg[iarg+1],1,ntypes,nlo,nhi,error);
cut = force->numeric(FLERR,arg[iarg+2]);
cut = utils::numeric(FLERR,arg[iarg+2],false,lmp);
cutghostuser = MAX(cutghostuser,cut);
if (cut < 0.0)
error->all(FLERR,"Invalid cutoff in comm_modify command");
@ -348,11 +348,11 @@ void Comm::set_processors(int narg, char **arg)
if (narg < 3) error->all(FLERR,"Illegal processors command");
if (strcmp(arg[0],"*") == 0) user_procgrid[0] = 0;
else user_procgrid[0] = force->inumeric(FLERR,arg[0]);
else user_procgrid[0] = utils::inumeric(FLERR,arg[0],false,lmp);
if (strcmp(arg[1],"*") == 0) user_procgrid[1] = 0;
else user_procgrid[1] = force->inumeric(FLERR,arg[1]);
else user_procgrid[1] = utils::inumeric(FLERR,arg[1],false,lmp);
if (strcmp(arg[2],"*") == 0) user_procgrid[2] = 0;
else user_procgrid[2] = force->inumeric(FLERR,arg[2]);
else user_procgrid[2] = utils::inumeric(FLERR,arg[2],false,lmp);
if (user_procgrid[0] < 0 || user_procgrid[1] < 0 || user_procgrid[2] < 0)
error->all(FLERR,"Illegal processors command");
@ -373,13 +373,13 @@ void Comm::set_processors(int narg, char **arg)
if (iarg+6 > narg) error->all(FLERR,"Illegal processors command");
gridflag = TWOLEVEL;
ncores = force->inumeric(FLERR,arg[iarg+2]);
ncores = utils::inumeric(FLERR,arg[iarg+2],false,lmp);
if (strcmp(arg[iarg+3],"*") == 0) user_coregrid[0] = 0;
else user_coregrid[0] = force->inumeric(FLERR,arg[iarg+3]);
else user_coregrid[0] = utils::inumeric(FLERR,arg[iarg+3],false,lmp);
if (strcmp(arg[iarg+4],"*") == 0) user_coregrid[1] = 0;
else user_coregrid[1] = force->inumeric(FLERR,arg[iarg+4]);
else user_coregrid[1] = utils::inumeric(FLERR,arg[iarg+4],false,lmp);
if (strcmp(arg[iarg+5],"*") == 0) user_coregrid[2] = 0;
else user_coregrid[2] = force->inumeric(FLERR,arg[iarg+5]);
else user_coregrid[2] = utils::inumeric(FLERR,arg[iarg+5],false,lmp);
if (ncores <= 0 || user_coregrid[0] < 0 ||
user_coregrid[1] < 0 || user_coregrid[2] < 0)
@ -422,8 +422,8 @@ void Comm::set_processors(int narg, char **arg)
error->all(FLERR,
"Cannot use processors part command "
"without using partitions");
int isend = force->inumeric(FLERR,arg[iarg+1]);
int irecv = force->inumeric(FLERR,arg[iarg+2]);
int isend = utils::inumeric(FLERR,arg[iarg+1],false,lmp);
int irecv = utils::inumeric(FLERR,arg[iarg+2],false,lmp);
if (isend < 1 || isend > universe->nworlds ||
irecv < 1 || irecv > universe->nworlds || isend == irecv)
error->all(FLERR,"Invalid partitions in processors part command");