use correct type and converions function

This commit is contained in:
Axel Kohlmeyer
2025-06-28 04:24:46 -04:00
parent 8dae514e03
commit 2e4f29c900
3 changed files with 6 additions and 6 deletions

View File

@ -119,7 +119,7 @@ void PairUF3::settings(int narg, char **arg)
error->all(FLERR,
"Invalid number of arguments for pair_style uf3"
" Are you using a 2-body or 2 & 3-body UF potential?");
nbody_flag = utils::numeric(FLERR, arg[0], true, lmp);
nbody_flag = utils::inumeric(FLERR, arg[0], true, lmp);
if (nbody_flag == 2) {
pot_3b = false;
manybody_flag = 0;

View File

@ -256,7 +256,7 @@ void AngleCosineBuck6d::coeff(int narg, char **arg)
double c_one = utils::numeric(FLERR,arg[1],false,lmp);
int n_one = utils::inumeric(FLERR,arg[2],false,lmp);
int th0_one = utils::numeric(FLERR,arg[3],false,lmp);
double th0_one = utils::numeric(FLERR,arg[3],false,lmp);
if (n_one <= 0) error->all(FLERR,"Incorrect args for angle coefficients" + utils::errorurl(21));

View File

@ -424,7 +424,7 @@ void PairTable::read_table(Table *tb, char *file, char *keyword)
} else if (tb->rflag == BMP) {
rsq_lookup.i = i << nshiftbits;
rsq_lookup.i |= masklo;
if (rsq_lookup.f < tb->rlo * tb->rlo) {
if ((double)rsq_lookup.f < tb->rlo * tb->rlo) {
rsq_lookup.i = i << nshiftbits;
rsq_lookup.i |= maskhi;
}
@ -759,7 +759,7 @@ void PairTable::compute_table(Table *tb)
for (int i = 0; i < ntable; i++) {
rsq_lookup.i = i << tb->nshiftbits;
rsq_lookup.i |= masklo;
if (rsq_lookup.f < tb->innersq) {
if ((double)rsq_lookup.f < tb->innersq) {
rsq_lookup.i = i << tb->nshiftbits;
rsq_lookup.i |= maskhi;
}
@ -809,7 +809,7 @@ void PairTable::compute_table(Table *tb)
if (itablemax == 0) itablemaxm1 = ntablem1;
rsq_lookup.i = itablemax << tb->nshiftbits;
rsq_lookup.i |= maskhi;
if (rsq_lookup.f < tb->cut * tb->cut) {
if ((double)rsq_lookup.f < tb->cut * tb->cut) {
if (tb->match) {
tb->de[itablemax] = tb->de[itablemaxm1];
tb->df[itablemax] = tb->df[itablemaxm1];
@ -821,7 +821,7 @@ void PairTable::compute_table(Table *tb)
f_tmp = splint(tb->rfile, tb->ffile, tb->f2file, tb->ninput, r) / r;
tb->de[itablemax] = e_tmp - tb->e[itablemax];
tb->df[itablemax] = f_tmp - tb->f[itablemax];
tb->drsq[itablemax] = 1.0 / (rsq_lookup.f - tb->rsq[itablemax]);
tb->drsq[itablemax] = 1.0 / ((double)rsq_lookup.f - tb->rsq[itablemax]);
}
}
}