lammps-master/src/USER-MISC/pair_coul_shield.h
inline double calc_Tap(double r_ij, double Rcut) {
    double Tap,r;
    //int Tap_coeff[8] = {1,0,0,0,-35,84,-70,20};
    double Tap_coeff[8] = {1.0,0.0,0.0,0.0,-35.0,84.0,-70.0,20.0};

    r = r_ij/Rcut;
    Tap = 0.0;

    Tap = Tap_coeff[7] * r + Tap_coeff[6];
    Tap = Tap * r  + Tap_coeff[5];
    Tap = Tap * r  + Tap_coeff[4];
    Tap = Tap * r  + Tap_coeff[3];
    Tap = Tap * r  + Tap_coeff[2];
    Tap = Tap * r  + Tap_coeff[1];
    Tap = Tap * r  + Tap_coeff[0];

    return(Tap);
  }
/* ----Calculate the long-range cutoff term */
Calculate the long-range cutoff term
Calculate the long - range cutoff term
inline double calc_Tap(double r_ij, double Rcut) {
    double Tap,r;
    double Tap_coeff[8] = {1.0,0.0,0.0,0.0,-35.0,84.0,-70.0,20.0};
    r = r_ij/Rcut;
    Tap = 0.0;
    Tap = Tap_coeff[7] * r + Tap_coeff[6];
    Tap = Tap * r  + Tap_coeff[5];
    Tap = Tap * r  + Tap_coeff[4];
    Tap = Tap * r  + Tap_coeff[3];
    Tap = Tap * r  + Tap_coeff[2];
    Tap = Tap * r  + Tap_coeff[1];
    Tap = Tap * r  + Tap_coeff[0];
    return(Tap);
  }
inline double calc_Tap ( double r_ij , double Rcut ) { double Tap , r ; double Tap_coeff [ 8 ] = { 1.0 , 0.0 , 0.0 , 0.0 , -35.0 , 84.0 , -70.0 , 20.0 } ; r = r_ij / Rcut ; Tap = 0.0 ; Tap = Tap_coeff [ 7 ] * r + Tap_coeff [ 6 ] ; Tap = Tap * r + Tap_coeff [ 5 ] ; Tap = Tap * r + Tap_coeff [ 4 ] ; Tap = Tap * r + Tap_coeff [ 3 ] ; Tap = Tap * r + Tap_coeff [ 2 ] ; Tap = Tap * r + Tap_coeff [ 1 ] ; Tap = Tap * r + Tap_coeff [ 0 ] ; return ( Tap ) ; }
Calculate the long-range cutoff term
Calculate the long - range cutoff term
//int Tap_coeff[8] = {1,0,0,0,-35,84,-70,20};