Commit 0cfe8980 authored by Axel Kohlmeyer's avatar Axel Kohlmeyer
Browse files

dead code removal

parent 2988508c
Loading
Loading
Loading
Loading
+2 −6
Original line number Diff line number Diff line
@@ -1271,7 +1271,7 @@ double PairAIREBO::bondorder(int i, int j, double rij[3],
  double w21,dw21,r34[3],r34mag,cos234,w34,dw34;
  double cross321[3],cross234[3],prefactor,SpN;
  double fcijpc,fcikpc,fcjlpc,fcjkpc,fcilpc;
  double dt2dik[3],dt2djl[3],dt2dij[3],aa,aaa1,aaa2,at2,cw,cwnum,cwnom;
  double dt2dik[3],dt2djl[3],dt2dij[3],aa,aaa2,at2,cw,cwnum,cwnom;
  double sin321,sin234,rr,rijrik,rijrjl,rjk2,rik2,ril2,rjl2;
  double dctik,dctjk,dctjl,dctij,dctji,dctil,rik2i,rjl2i,sink2i,sinl2i;
  double rjk[3],ril[3],dt1dik,dt1djk,dt1djl,dt1dil,dt1dij;
@@ -1856,8 +1856,6 @@ double PairAIREBO::bondorder(int i, int j, double rij[3],

                aa = (prefactor*2.0*cw/cwnom)*w21*w34 *
                  (1.0-tspjik)*(1.0-tspijl);
                aaa1 = -prefactor*(1.0-square(om1234)) *
                  (1.0-tspjik)*(1.0-tspijl);
                aaa2 = -prefactor*(1.0-square(om1234)) * w21*w34;
                at2 = aa*cwnum;

@@ -2107,7 +2105,7 @@ double PairAIREBO::bondorderLJ(int i, int j, double rij[3], double rijmag,
  double w21,dw21,r34[3],r34mag,cos234,w34,dw34;
  double cross321[3],cross234[3],prefactor,SpN;
  double fcikpc,fcjlpc,fcjkpc,fcilpc;
  double dt2dik[3],dt2djl[3],aa,aaa1,aaa2,at2,cw,cwnum,cwnom;
  double dt2dik[3],dt2djl[3],aa,aaa2,at2,cw,cwnum,cwnom;
  double sin321,sin234,rr,rijrik,rijrjl,rjk2,rik2,ril2,rjl2;
  double dctik,dctjk,dctjl,dctil,rik2i,rjl2i,sink2i,sinl2i;
  double rjk[3],ril[3],dt1dik,dt1djk,dt1djl,dt1dil;
@@ -2800,8 +2798,6 @@ double PairAIREBO::bondorderLJ(int i, int j, double rij[3], double rijmag,

                  aa = (prefactor*2.0*cw/cwnom)*w21*w34 *
                    (1.0-tspjik)*(1.0-tspijl);
                  aaa1 = -prefactor*(1.0-square(om1234)) *
                    (1.0-tspjik)*(1.0-tspijl);
                  aaa2 = -prefactor*(1.0-square(om1234)) * w21*w34;
                  at2 = aa*cwnum;

+2 −6
Original line number Diff line number Diff line
@@ -1038,7 +1038,7 @@ double PairAIREBOOMP::bondorder_thr(int i, int j, double rij[3], double rijmag,
  double w21,dw21,r34[3],r34mag,cos234,w34,dw34;
  double cross321[3],cross234[3],prefactor,SpN;
  double fcijpc,fcikpc,fcjlpc,fcjkpc,fcilpc;
  double dt2dik[3],dt2djl[3],dt2dij[3],aa,aaa1,aaa2,at2,cw,cwnum,cwnom;
  double dt2dik[3],dt2djl[3],dt2dij[3],aa,aaa2,at2,cw,cwnum,cwnom;
  double sin321,sin234,rr,rijrik,rijrjl,rjk2,rik2,ril2,rjl2;
  double dctik,dctjk,dctjl,dctij,dctji,dctil,rik2i,rjl2i,sink2i,sinl2i;
  double rjk[3],ril[3],dt1dik,dt1djk,dt1djl,dt1dil,dt1dij;
@@ -1628,8 +1628,6 @@ double PairAIREBOOMP::bondorder_thr(int i, int j, double rij[3], double rijmag,

                aa = (prefactor*2.0*cw/cwnom)*w21*w34 *
                  (1.0-tspjik)*(1.0-tspijl);
                aaa1 = -prefactor*(1.0-square(om1234)) *
                  (1.0-tspjik)*(1.0-tspijl);
                aaa2 = -prefactor*(1.0-square(om1234)) * w21*w34;
                at2 = aa*cwnum;

@@ -1879,7 +1877,7 @@ double PairAIREBOOMP::bondorderLJ_thr(int i, int j, double rij[3], double rijmag
  double w21,dw21,r34[3],r34mag,cos234,w34,dw34;
  double cross321[3],cross234[3],prefactor,SpN;
  double fcikpc,fcjlpc,fcjkpc,fcilpc;
  double dt2dik[3],dt2djl[3],aa,aaa1,aaa2,at2,cw,cwnum,cwnom;
  double dt2dik[3],dt2djl[3],aa,aaa2,at2,cw,cwnum,cwnom;
  double sin321,sin234,rr,rijrik,rijrjl,rjk2,rik2,ril2,rjl2;
  double dctik,dctjk,dctjl,dctil,rik2i,rjl2i,sink2i,sinl2i;
  double rjk[3],ril[3],dt1dik,dt1djk,dt1djl,dt1dil;
@@ -2572,8 +2570,6 @@ double PairAIREBOOMP::bondorderLJ_thr(int i, int j, double rij[3], double rijmag

                  aa = (prefactor*2.0*cw/cwnom)*w21*w34 *
                    (1.0-tspjik)*(1.0-tspijl);
                  aaa1 = -prefactor*(1.0-square(om1234)) *
                    (1.0-tspjik)*(1.0-tspijl);
                  aaa2 = -prefactor*(1.0-square(om1234)) * w21*w34;
                  at2 = aa*cwnum;

+7 −6
Original line number Diff line number Diff line
@@ -572,17 +572,18 @@ void PairReaxCOMP::read_reax_forces(int vflag)

void PairReaxCOMP::FindBond()
{
  int i, ii, j, pj, jtag, nj, jtmp, jj;
  double bo_tmp, bo_cut, rij, rsq;

  bond_data *bo_ij;
  bo_cut = 0.10;
  const double bo_cut = 0.10;
  int i;

#if defined(_OPENMP)
#pragma omp parallel for schedule(static) default(shared)   \
  private(i, nj, pj, bo_ij, j, bo_tmp)
  private(i)
#endif
  for (i = 0; i < system->n; i++) {
    int j, pj, nj;
    double bo_tmp;
    bond_data *bo_ij;

    nj = 0;
    for( pj = Start_Index(i, lists); pj < End_Index(i, lists); ++pj ) {
      bo_ij = &( lists->select.bond_list[pj] );
+0 −12
Original line number Diff line number Diff line
@@ -55,7 +55,6 @@ void Add_dBond_to_ForcesOMP( reax_system *system, int i, int pj,
  long reductionOffset = (system->N * tid);

  /* Virial Tallying variables */
  double f_scaler;
  rvec fi_tmp, fj_tmp, fk_tmp, delij, delji, delki, delkj, temp;

  /* Initializations */
@@ -229,14 +228,11 @@ void Add_dBond_to_Forces_NPTOMP( reax_system *system, int i, int pj, simulation_
  ivec rel_box;
  int pk, k, j;

  PairReaxCOMP *pair_reax_ptr = static_cast<class PairReaxCOMP*>(system->pair_ptr);

#if defined(_OPENMP)
  int tid = omp_get_thread_num();
#else
  int tid = 0;
#endif
  ThrData *thr = pair_reax_ptr->getFixOMP()->get_thr(tid);
  long reductionOffset = (system->N * tid);

  /* Initializations */
@@ -430,12 +426,9 @@ void BOOMP( reax_system *system, control_params *control, simulation_data *data,
#endif

  double p_lp1 = system->reax_param.gp.l[15];
  int  num_bonds = 0;
  double p_boc1 = system->reax_param.gp.l[0];
  double p_boc2 = system->reax_param.gp.l[1];
  reax_list *bonds = (*lists) + BONDS;
  int  natoms = system->N;
  int  nthreads = control->nthreads;

#if defined(_OPENMP)
#pragma omp parallel default(shared)
@@ -454,11 +447,6 @@ void BOOMP( reax_system *system, control_params *control, simulation_data *data,
    two_body_parameters *twbp;
    bond_order_data *bo_ij, *bo_ji;

#if defined(_OPENMP)
    int tid = omp_get_thread_num();
#else
    int tid = 0;
#endif
    /* Calculate Deltaprime, Deltaprime_boc values */
#if defined(_OPENMP)
#pragma omp for schedule(static)
+5 −12
Original line number Diff line number Diff line
@@ -265,7 +265,6 @@ void Validate_ListsOMP( reax_system *system, storage *workspace, reax_list **lis
{
  int i, comp, Hindex;
  reax_list *bonds, *hbonds;
  reallocate_data *realloc = &(workspace->realloc);
  double saferzone = system->saferzone;

#if defined(_OPENMP)
@@ -335,25 +334,21 @@ void Init_Forces_noQEq_OMP( reax_system *system, control_params *control,
  startTimeBase = MPI_Wtime();
#endif

  int i, j, pi, pj;
  int start_i, end_i, start_j, end_j;
  int i, j, pj;
  int start_i, end_i;
  int type_i, type_j;
  int ihb, jhb, ihb_top, jhb_top;
  int local, flag;
  double r_ij, cutoff;
  double cutoff;
  single_body_parameters *sbp_i, *sbp_j;
  two_body_parameters *twbp;
  far_neighbor_data *nbr_pj;
  reax_atom *atom_i, *atom_j;
  bond_data *ibond, *jbond;
  reax_list *far_nbrs = *lists + FAR_NBRS;
  reax_list *bonds = *lists + BONDS;
  reax_list *hbonds = *lists + HBONDS;
  int num_bonds = 0;
  int num_hbonds = 0;
  int btop_i = 0;
  int btop_j = 0;
  int renbr = (data->step-data->prev_steps) % control->reneighbor == 0;

  // We will use CdDeltaReduction as a temporary (double) buffer to accumulate total_bond_order
  // This is safe because CdDeltaReduction is currently zeroed and its accumulation doesn't start until BondsOMP()
@@ -368,8 +363,8 @@ void Init_Forces_noQEq_OMP( reax_system *system, control_params *control,

#if defined(_OPENMP)
#pragma omp parallel default(shared) \
  private(i, atom_i, type_i, pi, start_i, end_i, sbp_i, btop_i, ibond, ihb, ihb_top, \
          j, atom_j, type_j, pj, start_j, end_j, sbp_j, nbr_pj, jbond, jhb, twbp)
  private(i, atom_i, type_i, start_i, end_i, sbp_i, btop_i, ihb, ihb_top, \
          j, atom_j, type_j, pj, sbp_j, nbr_pj, jhb, twbp)
#endif
  {

@@ -417,7 +412,6 @@ void Init_Forces_noQEq_OMP( reax_system *system, control_params *control,
	// outside of critical section.

	// Start top portion of BOp()
	int jj = nbr_pj->nbr;
	double C12, C34, C56;
	double BO, BO_s, BO_pi, BO_pi2;
	double bo_cut = control->bo_cut;
@@ -602,7 +596,6 @@ void Compute_ForcesOMP( reax_system *system, control_params *control,
                     reax_list **lists, output_controls *out_control,
                     mpi_datatypes *mpi_data )
{
  int qeq_flag;
  MPI_Comm comm = mpi_data->world;

  // Init Forces
Loading