Silence some warnings
This commit is contained in:
@ -101,7 +101,7 @@ MEAM::getscreen(int i, double* scrfcn, double* dscrfcn, double* fcpair, double**
|
||||
double xjtmp, yjtmp, zjtmp, delxik, delyik, delzik, rik2 /*,rik*/;
|
||||
double xktmp, yktmp, zktmp, delxjk, delyjk, delzjk, rjk2 /*,rjk*/;
|
||||
double xik, xjk, sij, fcij, sfcij, dfcij, sikj, dfikj, cikj;
|
||||
double Cmin, Cmax, delc, /*ebound,*/ rbound, a, coef1, coef2;
|
||||
double Cmin, Cmax, delc, /*ebound,*/ a, coef1, coef2;
|
||||
double dCikj;
|
||||
double rnorm, fc, dfc, drinv;
|
||||
|
||||
@ -129,6 +129,7 @@ MEAM::getscreen(int i, double* scrfcn, double* dscrfcn, double* fcpair, double**
|
||||
rij2 = delxij * delxij + delyij * delyij + delzij * delzij;
|
||||
rij = sqrt(rij2);
|
||||
|
||||
const double rbound = this->ebound_meam[elti][eltj] * rij2;
|
||||
if (rij > this->rc_meam) {
|
||||
fcij = 0.0;
|
||||
dfcij = 0.0;
|
||||
@ -138,7 +139,6 @@ MEAM::getscreen(int i, double* scrfcn, double* dscrfcn, double* fcpair, double**
|
||||
sij = 1.0;
|
||||
|
||||
// if rjk2 > ebound*rijsq, atom k is definitely outside the ellipse
|
||||
const double rbound = this->ebound_meam[elti][eltj] * rij2;
|
||||
for (kn = 0; kn < numneigh_full; kn++) {
|
||||
k = firstneigh_full[kn];
|
||||
eltk = fmap[type[k]];
|
||||
@ -193,7 +193,6 @@ MEAM::getscreen(int i, double* scrfcn, double* dscrfcn, double* fcpair, double**
|
||||
if (iszero(sfcij) || iszero(sfcij - 1.0))
|
||||
goto LABEL_100;
|
||||
|
||||
rbound = this->ebound_meam[elti][eltj] * rij2;
|
||||
for (kn = 0; kn < numneigh_full; kn++) {
|
||||
k = firstneigh_full[kn];
|
||||
if (k == j) continue;
|
||||
|
||||
@ -87,7 +87,7 @@ MEAM::dG_gam(const double gamma, const int ibar, double& dG) const
|
||||
// e.g. gsmooth_factor is 99, {:
|
||||
// gsmooth_switchpoint = -0.99
|
||||
// G = 0.01*(-0.99/gamma)**99
|
||||
double G = 1 / (gsmooth_factor + 1) * pow((gsmooth_switchpoint / gamma), gsmooth_factor);
|
||||
G = 1 / (gsmooth_factor + 1) * pow((gsmooth_switchpoint / gamma), gsmooth_factor);
|
||||
G = sqrt(G);
|
||||
dG = -gsmooth_factor * G / (2.0 * gamma);
|
||||
return G;
|
||||
|
||||
@ -206,7 +206,7 @@ void PairMEAMC::settings(int narg, char **/*arg*/)
|
||||
|
||||
void PairMEAMC::coeff(int narg, char **arg)
|
||||
{
|
||||
int i,j,m,n;
|
||||
int m,n;
|
||||
|
||||
if (!allocated) allocate();
|
||||
|
||||
@ -222,7 +222,7 @@ void PairMEAMC::coeff(int narg, char **arg)
|
||||
// elements = list of unique element names
|
||||
|
||||
if (nelements) {
|
||||
for (i = 0; i < nelements; i++) delete [] elements[i];
|
||||
for (int i = 0; i < nelements; i++) delete [] elements[i];
|
||||
delete [] elements;
|
||||
delete [] mass;
|
||||
}
|
||||
@ -231,7 +231,7 @@ void PairMEAMC::coeff(int narg, char **arg)
|
||||
elements = new char*[nelements];
|
||||
mass = new double[nelements];
|
||||
|
||||
for (i = 0; i < nelements; i++) {
|
||||
for (int i = 0; i < nelements; i++) {
|
||||
n = strlen(arg[i+3]) + 1;
|
||||
elements[i] = new char[n];
|
||||
strcpy(elements[i],arg[i+3]);
|
||||
@ -247,8 +247,9 @@ void PairMEAMC::coeff(int narg, char **arg)
|
||||
// read args that map atom types to MEAM elements
|
||||
// map[i] = which element the Ith atom type is, -1 if not mapped
|
||||
|
||||
for (i = 4 + nelements; i < narg; i++) {
|
||||
for (int i = 4 + nelements; i < narg; i++) {
|
||||
m = i - (4+nelements) + 1;
|
||||
int j;
|
||||
for (j = 0; j < nelements; j++)
|
||||
if (strcmp(arg[i],elements[j]) == 0) break;
|
||||
if (j < nelements) map[m] = j;
|
||||
|
||||
Reference in New Issue
Block a user