Commit f092da80 authored by Sebastian Hütter's avatar Sebastian Hütter
Browse files

Fix some shadowing warnings

parent 5e165e67
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -109,8 +109,8 @@ public:
  double *scrfcn,*dscrfcn,*fcpair;
 protected:
  void meam_checkindex(int, int, int, int*, int*);
  void G_gam(double, int, double, double*, int*);
  void dG_gam(double, int, double, double*, double*);
  void G_gam(double, int, double*, int*);
  void dG_gam(double, int, double*, double*);
  void getscreen(int i, double* scrfcn, double* dscrfcn, double* fcpair,
          double** x, int numneigh, int* firstneigh, int numneigh_full,
          int* firstneigh_full, int ntype, int* type, int* fmap);
+6 −10
Original line number Diff line number Diff line
@@ -81,8 +81,7 @@ MEAM::meam_dens_final(int* nlocal, int* eflag_either, int* eflag_global,

      Z = this->Z_meam[elti];

      G_gam(arr1v(gamma, i), this->ibar_meam[elti],
            this->gsmooth_factor, &G, errorflag);
      G_gam(arr1v(gamma, i), this->ibar_meam[elti], &G, errorflag);
      if (*errorflag != 0)
        return;
      get_shpfcn(shp, this->lattce_meam[elti][elti]);
@@ -100,8 +99,7 @@ MEAM::meam_dens_final(int* nlocal, int* eflag_either, int* eflag_global,
                 this->t3_meam[elti] * shp[3]) /
                (Z * Z);
        }
        G_gam(gam, this->ibar_meam[elti], this->gsmooth_factor, &Gbar,
              errorflag);
        G_gam(gam, this->ibar_meam[elti], &Gbar, errorflag);
      }
      arr1v(rho, i) = arr1v(rho0, i) * G;

@@ -113,8 +111,7 @@ MEAM::meam_dens_final(int* nlocal, int* eflag_either, int* eflag_global,
          gam = (arr2v(t_ave, 1, i) * shp[1] + arr2v(t_ave, 2, i) * shp[2] +
                 arr2v(t_ave, 3, i) * shp[3]) /
                (Z * Z);
          dG_gam(gam, this->ibar_meam[elti], this->gsmooth_factor,
                 &Gbar, &dGbar);
          dG_gam(gam, this->ibar_meam[elti], &Gbar, &dGbar);
        }
        rho_bkgd = this->rho0_meam[elti] * Z * Gbar;
      } else {
@@ -127,8 +124,7 @@ MEAM::meam_dens_final(int* nlocal, int* eflag_either, int* eflag_global,
      rhob = arr1v(rho, i) / rho_bkgd;
      denom = 1.0 / rho_bkgd;

      dG_gam(arr1v(gamma, i), this->ibar_meam[elti],
             this->gsmooth_factor, &G, &dG);
      dG_gam(arr1v(gamma, i), this->ibar_meam[elti], &G, &dG);

      arr1v(dgamma1, i) = (G - 2 * dG * arr1v(gamma, i)) * denom;

@@ -185,7 +181,7 @@ MEAM::meam_dens_final(int* nlocal, int* eflag_either, int* eflag_global,
// ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc

void
MEAM::G_gam(double gamma, int ibar, double gsmooth_factor, double* G, int* errorflag)
MEAM::G_gam(double gamma, int ibar, double* G, int* errorflag)
{
  //     Compute G(gamma) based on selection flag ibar:
  //   0 => G = sqrt(1+gamma)
@@ -226,7 +222,7 @@ MEAM::G_gam(double gamma, int ibar, double gsmooth_factor, double* G, int* error
// ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc

void
MEAM::dG_gam(double gamma, int ibar, double gsmooth_factor, double* G, double* dG)
MEAM::dG_gam(double gamma, int ibar, double* G, double* dG)
{
  // Compute G(gamma) and dG(gamma) based on selection flag ibar:
  //   0 => G = sqrt(1+gamma)
+5 −10
Original line number Diff line number Diff line
@@ -471,16 +471,14 @@ MEAM::phi_meam(double r, int a, int b)
      else {
        get_shpfcn(s1, this->lattce_meam[a][a]);
        Gam1 = (s1[1] * t11av + s1[2] * t21av + s1[3] * t31av) / (Z1 * Z1);
        G_gam(Gam1, this->ibar_meam[a], this->gsmooth_factor, &G1,
              &errorflag);
        G_gam(Gam1, this->ibar_meam[a], &G1, &errorflag);
      }
      if (this->ibar_meam[b] <= 0)
        G2 = 1.0;
      else {
        get_shpfcn(s2, this->lattce_meam[b][b]);
        Gam2 = (s2[1] * t12av + s2[2] * t22av + s2[3] * t32av) / (Z2 * Z2);
        G_gam(Gam2, this->ibar_meam[b], this->gsmooth_factor, &G2,
              &errorflag);
        G_gam(Gam2, this->ibar_meam[b], &G2, &errorflag);
      }
      rho0_1 = this->rho0_meam[a] * Z1 * G1;
      rho0_2 = this->rho0_meam[b] * Z2 * G2;
@@ -497,10 +495,8 @@ MEAM::phi_meam(double r, int a, int b)
    else
      Gam2 = Gam2 / (rho02 * rho02);

    G_gam(Gam1, this->ibar_meam[a], this->gsmooth_factor, &G1,
          &errorflag);
    G_gam(Gam2, this->ibar_meam[b], this->gsmooth_factor, &G2,
          &errorflag);
    G_gam(Gam1, this->ibar_meam[a], &G1, &errorflag);
    G_gam(Gam2, this->ibar_meam[b], &G2, &errorflag);
    if (this->mix_ref_t == 1) {
      rho_bkgd1 = rho0_1;
      rho_bkgd2 = rho0_2;
@@ -602,8 +598,7 @@ MEAM::compute_reference_density(void)
      gam = (this->t1_meam[a] * shp[1] + this->t2_meam[a] * shp[2] +
             this->t3_meam[a] * shp[3]) /
            (Z * Z);
      G_gam(gam, this->ibar_meam[a], this->gsmooth_factor, &Gbar,
            &errorflag);
      G_gam(gam, this->ibar_meam[a], &Gbar, &errorflag);
    }

    //     The zeroth order density in the reference structure, with
+1 −1
Original line number Diff line number Diff line
@@ -89,7 +89,7 @@ PairMEAMC::~PairMEAMC()

void PairMEAMC::compute(int eflag, int vflag)
{
  int i,j,ii,n,inum_half,errorflag;
  int i,ii,n,inum_half,errorflag;
  int *ilist_half,*numneigh_half,**firstneigh_half;
  int *numneigh_full,**firstneigh_full;