Commit f1ec6dc4 authored by Axel Kohlmeyer's avatar Axel Kohlmeyer
Browse files

dead code removal and reformatting

parent c3f6e27b
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -36,8 +36,6 @@

using namespace LAMMPS_NS;

/* ---------------------------------------------------------------------- */

void Add_dBond_to_ForcesOMP( reax_system *system, int i, int pj,
                             storage *workspace, reax_list **lists ) {
  reax_list *bonds = (*lists) + BONDS;
+0 −1
Original line number Diff line number Diff line
@@ -51,7 +51,6 @@ void Hydrogen_BondsOMP( reax_system *system, control_params *control,
#endif

  const int nthreads = control->nthreads;
  long totalReductionSize = system->N;

#if defined(_OPENMP)
#pragma omp parallel default(shared) //default(none)
+0 −1
Original line number Diff line number Diff line
@@ -53,7 +53,6 @@ int Init_ListsOMP( reax_system *system, control_params *control,
  int *hb_top, *bond_top;
  MPI_Comm comm;

  int TWICE = 2;
  int mincap = system->mincap;
  double safezone = system->safezone;
  double saferzone = system->saferzone;
+2 −5
Original line number Diff line number Diff line
@@ -73,7 +73,7 @@ void Torsion_AnglesOMP( reax_system *system, control_params *control,
 {
  int i, j, k, l, pi, pj, pk, pl, pij, plk;
  int type_i, type_j, type_k, type_l;
  int start_j, end_j, start_k, end_k;
  int start_j, end_j;
  int start_pj, end_pj, start_pk, end_pk;
  int num_frb_intrs = 0;

@@ -108,7 +108,7 @@ void Torsion_AnglesOMP( reax_system *system, control_params *control,

  // Virial tallying variables
  double delil[3], deljl[3], delkl[3];
  double eng_tmp, f_scaler, fi_tmp[3], fj_tmp[3], fk_tmp[3];
  double eng_tmp, fi_tmp[3], fj_tmp[3], fk_tmp[3];

#if defined(_OPENMP)
  int tid = omp_get_thread_num();
@@ -116,7 +116,6 @@ void Torsion_AnglesOMP( reax_system *system, control_params *control,
  int tid = 0;
#endif
  long reductionOffset = (system->N * tid);
  int num_thb_intrs = 0;
  class PairReaxCOMP *pair_reax_ptr;
  pair_reax_ptr = static_cast<class PairReaxCOMP*>(system->pair_ptr);
  class ThrData *thr = pair_reax_ptr->getFixOMP()->get_thr(tid);
@@ -156,8 +155,6 @@ void Torsion_AnglesOMP( reax_system *system, control_params *control,
         trying to form a 4-body interaction out of this neighborhood */
      if (system->my_atoms[j].orig_id < system->my_atoms[k].orig_id &&
          bo_jk->BO > control->thb_cut/*0*/ && Num_Entries(pk, thb_intrs)) {
        start_k = Start_Index(k, bonds);
        end_k = End_Index(k, bonds);
        pj = pbond_jk->sym_index; // pj points to j on k's list
	
        /* do the same check as above:
+384 −390
Original line number Diff line number Diff line
@@ -47,7 +47,6 @@ void Calculate_dCos_ThetaOMP( rvec dvec_ji, double d_ji, rvec dvec_jk, double d_
			      rvec* dcos_theta_dj,
			      rvec* dcos_theta_dk )
{
  int t;
  double sqr_d_ji = SQR(d_ji);
  double sqr_d_jk = SQR(d_jk);
  double inv_dists = 1.0 / (d_ji * d_jk);
@@ -122,9 +121,7 @@ void Valence_AnglesOMP( reax_system *system, control_params *control,
  double total_Epen = 0;
  double total_Ecoa = 0;

  int  per_atom = (thb_intrs->num_intrs / system->N);
  int  nthreads = control->nthreads;
  int  chunksize = system->N/(nthreads*10);
  int  num_thb_intrs = 0;
  int  TWICE = 2;

@@ -133,7 +130,7 @@ void Valence_AnglesOMP( reax_system *system, control_params *control,
    int i, j, pi, k, pk, t;
    int type_i, type_j, type_k;
    int start_j, end_j, start_pk, end_pk;
  int cnt, my_offset, mark;
    int cnt, my_offset;

    double temp, temp_bo_jt, pBOjt7;
    double p_val1, p_val2, p_val3, p_val4, p_val5, p_val7;
@@ -149,13 +146,12 @@ void Valence_AnglesOMP( reax_system *system, control_params *control,
    double Cf7ij, Cf7jk, Cf8j, Cf9j;
    double f7_ij, f7_jk, f8_Dj, f9_Dj;
    double Ctheta_0, theta_0, theta_00, theta, cos_theta, sin_theta;
  double r_ij, r_jk;
    double BOA_ij, BOA_jk;
    rvec force, ext_press;
    // rtensor temp_rtensor, total_rtensor;

    // Tallying variables
  double eng_tmp, f_scaler, fi_tmp[3], fj_tmp[3], fk_tmp[3];
    double eng_tmp, fi_tmp[3], fj_tmp[3], fk_tmp[3];
    double delij[3], delkj[3];

    three_body_header *thbh;
@@ -343,7 +339,6 @@ void Valence_AnglesOMP( reax_system *system, control_params *control,

        if (BOA_ij > 0.0) {
          i = pbond_ij->nbr;
        r_ij = pbond_ij->d;
          type_i = system->my_atoms[i].type;
	
	
@@ -409,7 +404,6 @@ void Valence_AnglesOMP( reax_system *system, control_params *control,
                (bo_ij->BO > control->thb_cut) &&
                (bo_jk->BO > control->thb_cut) &&
                (bo_ij->BO * bo_jk->BO > control->thb_cutsq)) {
            r_jk = pbond_jk->d;
              thbh = &( system->reax_param.thbp[ type_i ][ type_j ][ type_k ] );
	   	
              for (cnt = 0; cnt < thbh->cnt; ++cnt) {