remove dead code detected by clang 15
This commit is contained in:
@ -92,7 +92,6 @@ void PairBrownian::compute(int eflag, int vflag)
|
||||
double prethermostat;
|
||||
double xl[3], a_sq, a_sh, a_pu, Fbmag;
|
||||
double p1[3], p2[3], p3[3];
|
||||
int overlaps = 0;
|
||||
|
||||
// This section of code adjusts R0/RT0/RS0 if necessary due to changes
|
||||
// in the volume fraction as a result of fix deform or moving walls
|
||||
@ -187,10 +186,6 @@ void PairBrownian::compute(int eflag, int vflag)
|
||||
|
||||
h_sep = r - 2.0 * radi;
|
||||
|
||||
// check for overlaps
|
||||
|
||||
if (h_sep < 0.0) overlaps++;
|
||||
|
||||
// if less than minimum gap, use minimum gap instead
|
||||
|
||||
if (r < cut_inner[itype][jtype]) h_sep = cut_inner[itype][jtype] - 2.0 * radi;
|
||||
@ -336,9 +331,6 @@ void PairBrownian::compute(int eflag, int vflag)
|
||||
}
|
||||
}
|
||||
|
||||
int print_overlaps = 0;
|
||||
if (print_overlaps && overlaps) printf("Number of overlaps=%d\n", overlaps);
|
||||
|
||||
if (vflag_fdotr) virial_fdotr_compute();
|
||||
}
|
||||
|
||||
|
||||
@ -72,7 +72,6 @@ void PairBrownianPoly::compute(int eflag, int vflag)
|
||||
int nlocal = atom->nlocal;
|
||||
|
||||
double vxmu2f = force->vxmu2f;
|
||||
int overlaps = 0;
|
||||
double randr;
|
||||
double prethermostat;
|
||||
double xl[3],a_sq,a_sh,a_pu,Fbmag;
|
||||
@ -176,10 +175,6 @@ void PairBrownianPoly::compute(int eflag, int vflag)
|
||||
|
||||
h_sep = r - radi-radj;
|
||||
|
||||
// check for overlaps
|
||||
|
||||
if (h_sep < 0.0) overlaps++;
|
||||
|
||||
// if less than minimum gap, use minimum gap instead
|
||||
|
||||
if (r < cut_inner[itype][jtype])
|
||||
|
||||
@ -407,7 +407,6 @@ void FixSAEDVTK::invoke_vector(bigint ntimestep)
|
||||
|
||||
// Finding the intersection of the reciprical space and Ewald sphere
|
||||
int NROW1 = 0;
|
||||
int NROW2 = 0;
|
||||
double dinv2 = 0.0;
|
||||
double r = 0.0;
|
||||
double K[3];
|
||||
@ -425,11 +424,9 @@ void FixSAEDVTK::invoke_vector(bigint ntimestep)
|
||||
fprintf(fp,"%g\n",vector_total[NROW1]/norm);
|
||||
fflush(fp);
|
||||
NROW1++;
|
||||
NROW2++;
|
||||
} else {
|
||||
fprintf(fp,"%d\n",-1);
|
||||
fflush(fp);
|
||||
NROW2++;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -449,17 +446,14 @@ void FixSAEDVTK::invoke_vector(bigint ntimestep)
|
||||
if ( (r > (R_Ewald - dR_Ewald) ) && (r < (R_Ewald + dR_Ewald) )) {
|
||||
fprintf(fp,"%g\n",vector_total[NROW1]/norm);
|
||||
fflush(fp);
|
||||
NROW2++;
|
||||
NROW1++;
|
||||
} else {
|
||||
fprintf(fp,"%d\n",-1);
|
||||
fflush(fp);
|
||||
NROW2++;
|
||||
}
|
||||
} else {
|
||||
fprintf(fp,"%d\n",-1);
|
||||
fflush(fp);
|
||||
NROW2++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -390,7 +390,6 @@ void FixRX::initSparse()
|
||||
int mxprod = 0;
|
||||
int mxreac = 0;
|
||||
int mxspec = 0;
|
||||
int nIntegral = 0;
|
||||
for (int i = 0; i < nreactions; ++i) {
|
||||
int nreac_i = 0, nprod_i = 0;
|
||||
std::string pstr, rstr;
|
||||
@ -430,7 +429,6 @@ void FixRX::initSparse()
|
||||
mxreac = std::max( mxreac, nreac_i );
|
||||
mxprod = std::max( mxprod, nprod_i );
|
||||
mxspec = std::max( mxspec, nreac_i + nprod_i );
|
||||
if (allAreIntegral) nIntegral++;
|
||||
}
|
||||
|
||||
if (comm->me == 0 && Verbosity > 1) {
|
||||
|
||||
@ -141,12 +141,6 @@ double ComputeTempRegionEff::compute_scalar()
|
||||
if (dof < 0.0 && tarray_all[0] > 0.0)
|
||||
error->all(FLERR, "Temperature compute degrees of freedom < 0");
|
||||
|
||||
int one = 0;
|
||||
for (int i = 0; i < nlocal; i++)
|
||||
if (mask[i] & groupbit && region->match(x[i][0], x[i][1], x[i][2])) {
|
||||
if (abs(spin[i]) == 1) one++;
|
||||
}
|
||||
|
||||
if (dof > 0.0)
|
||||
scalar = force->mvv2e * tarray_all[1] / (dof * force->boltz);
|
||||
else
|
||||
|
||||
@ -1417,14 +1417,13 @@ void FixElectrodeConp::gather_list_iele()
|
||||
}
|
||||
taglist_local.clear();
|
||||
iele_to_group_local.clear();
|
||||
for (int i = 0, iele = 0; i < nlocal; i++) {
|
||||
for (int i = 0; i < nlocal; i++) {
|
||||
if (mask[i] & groupbit) {
|
||||
tagint const t = tag[i];
|
||||
if (matrix_algo) list_iele.push_back(tag_to_iele[t]);
|
||||
taglist_local.push_back(t);
|
||||
for (int g = 0; g < num_of_groups; g++)
|
||||
if (mask[i] & group_bits[g]) iele_to_group_local.push_back(g);
|
||||
iele++;
|
||||
}
|
||||
}
|
||||
nlocalele = static_cast<int>(taglist_local.size()); // just for safety
|
||||
|
||||
@ -1209,7 +1209,7 @@ void EwaldDisp::compute_virial_dipole()
|
||||
double *ke, c[EWALD_NFUNCS] = {
|
||||
8.0*MY_PI*qscale/volume, 2.0*MY_PI*MY_PIS/(12.0*volume),
|
||||
2.0*MY_PI*MY_PIS/(192.0*volume), 8.0*MY_PI*mumurd2e/volume};
|
||||
int i, kx, ky, lbytes = (2*nbox+1)*sizeof(cvector), *type = atom->type;
|
||||
int i, kx, ky, lbytes = (2*nbox+1)*sizeof(cvector);
|
||||
int func[EWALD_NFUNCS];
|
||||
|
||||
memcpy(func, function, EWALD_NFUNCS*sizeof(int));
|
||||
@ -1273,7 +1273,6 @@ void EwaldDisp::compute_virial_dipole()
|
||||
vatomj[n] -= mysum[n];
|
||||
|
||||
z = (cvector *) ((char *) z+lbytes);
|
||||
++type;
|
||||
if (vflag_atom) vatomj += 6;
|
||||
}
|
||||
|
||||
|
||||
@ -197,7 +197,6 @@ void PairBrownianOMP::eval(int iifrom, int iito, ThrData * const thr)
|
||||
double prethermostat;
|
||||
double xl[3],a_sq,a_sh,a_pu,Fbmag;
|
||||
double p1[3],p2[3],p3[3];
|
||||
int overlaps = 0;
|
||||
|
||||
// scale factor for Brownian moments
|
||||
|
||||
@ -252,10 +251,6 @@ void PairBrownianOMP::eval(int iifrom, int iito, ThrData * const thr)
|
||||
|
||||
h_sep = r - 2.0*radi;
|
||||
|
||||
// check for overlaps
|
||||
|
||||
if (h_sep < 0.0) overlaps++;
|
||||
|
||||
// if less than minimum gap, use minimum gap instead
|
||||
|
||||
if (r < cut_inner[itype][jtype])
|
||||
|
||||
@ -187,7 +187,6 @@ void PairBrownianPolyOMP::eval(int iifrom, int iito, ThrData * const thr)
|
||||
RanMars &rng = *random_thr[thr->get_tid()];
|
||||
|
||||
double vxmu2f = force->vxmu2f;
|
||||
int overlaps = 0;
|
||||
double randr;
|
||||
double prethermostat;
|
||||
double xl[3],a_sq,a_sh,a_pu,Fbmag;
|
||||
@ -248,10 +247,6 @@ void PairBrownianPolyOMP::eval(int iifrom, int iito, ThrData * const thr)
|
||||
|
||||
h_sep = r - radi-radj;
|
||||
|
||||
// check for overlaps
|
||||
|
||||
if (h_sep < 0.0) overlaps++;
|
||||
|
||||
// if less than minimum gap, use minimum gap instead
|
||||
|
||||
if (r < cut_inner[itype][jtype])
|
||||
|
||||
@ -162,8 +162,6 @@ void PairLubricateOMP::eval(int iifrom, int iito, ThrData * const thr)
|
||||
const int * const type = atom->type;
|
||||
const int nlocal = atom->nlocal;
|
||||
|
||||
int overlaps = 0;
|
||||
|
||||
ilist = list->ilist;
|
||||
numneigh = list->numneigh;
|
||||
firstneigh = list->firstneigh;
|
||||
@ -317,10 +315,6 @@ void PairLubricateOMP::eval(int iifrom, int iito, ThrData * const thr)
|
||||
|
||||
h_sep = r - 2.0*radi;
|
||||
|
||||
// check for overlaps
|
||||
|
||||
if (h_sep < 0.0) overlaps++;
|
||||
|
||||
// if less than the minimum gap use the minimum gap instead
|
||||
|
||||
if (r < cut_inner[itype][jtype])
|
||||
|
||||
@ -163,8 +163,6 @@ void PairLubricatePolyOMP::eval(int iifrom, int iito, ThrData * const thr)
|
||||
const int * const type = atom->type;
|
||||
const int nlocal = atom->nlocal;
|
||||
|
||||
int overlaps = 0;
|
||||
|
||||
ilist = list->ilist;
|
||||
numneigh = list->numneigh;
|
||||
firstneigh = list->firstneigh;
|
||||
@ -322,10 +320,6 @@ void PairLubricatePolyOMP::eval(int iifrom, int iito, ThrData * const thr)
|
||||
|
||||
h_sep = r - radi-radj;
|
||||
|
||||
// check for overlaps
|
||||
|
||||
if (h_sep < 0.0) overlaps++;
|
||||
|
||||
// if less than the minimum gap use the minimum gap instead
|
||||
|
||||
if (r < cut_inner[itype][jtype])
|
||||
|
||||
@ -56,7 +56,6 @@ namespace ReaxFF {
|
||||
int start_j, end_j, hb_start_j, hb_end_j;
|
||||
int hblist[MAX_BONDS];
|
||||
int itr, top;
|
||||
int num_hb_intrs = 0;
|
||||
double r_jk, theta, cos_theta, sin_xhz4, cos_xhz1, sin_theta2;
|
||||
double e_hb, e_hb_thr = 0.0, exp_hb2, exp_hb3, CEhb1, CEhb2, CEhb3;
|
||||
rvec dcos_theta_di, dcos_theta_dj, dcos_theta_dk;
|
||||
@ -140,7 +139,6 @@ namespace ReaxFF {
|
||||
type_i = system->my_atoms[i].type;
|
||||
if (type_i < 0) continue;
|
||||
hbp = &(system->reax_param.hbp[type_i][type_j][type_k]);
|
||||
++num_hb_intrs;
|
||||
|
||||
Calculate_Theta(pbond_ij->dvec, pbond_ij->d, dvec_jk, r_jk,
|
||||
&theta, &cos_theta);
|
||||
|
||||
@ -587,8 +587,8 @@ void PairReaxFF::set_far_nbr(far_neighbor_data *fdest,
|
||||
int PairReaxFF::estimate_reax_lists()
|
||||
{
|
||||
int itr_i, itr_j, i, j;
|
||||
int num_nbrs, num_marked;
|
||||
int *ilist, *jlist, *numneigh, **firstneigh, *marked;
|
||||
int num_nbrs;
|
||||
int *ilist, *jlist, *numneigh, **firstneigh;
|
||||
double d_sqr;
|
||||
rvec dvec;
|
||||
double **x;
|
||||
@ -602,15 +602,11 @@ int PairReaxFF::estimate_reax_lists()
|
||||
firstneigh = list->firstneigh;
|
||||
|
||||
num_nbrs = 0;
|
||||
num_marked = 0;
|
||||
marked = (int*) calloc(api->system->N, sizeof(int));
|
||||
|
||||
int numall = list->inum + list->gnum;
|
||||
|
||||
for (itr_i = 0; itr_i < numall; ++itr_i) {
|
||||
i = ilist[itr_i];
|
||||
marked[i] = 1;
|
||||
++num_marked;
|
||||
jlist = firstneigh[i];
|
||||
|
||||
for (itr_j = 0; itr_j < numneigh[i]; ++itr_j) {
|
||||
@ -623,8 +619,6 @@ int PairReaxFF::estimate_reax_lists()
|
||||
}
|
||||
}
|
||||
|
||||
free(marked);
|
||||
|
||||
return static_cast<int> (MAX(num_nbrs*safezone, mincap*REAX_MIN_NBRS));
|
||||
}
|
||||
|
||||
|
||||
@ -39,7 +39,6 @@ namespace ReaxFF {
|
||||
int start_j, end_j, hb_start_j, hb_end_j;
|
||||
int hblist[MAX_BONDS];
|
||||
int itr, top;
|
||||
int num_hb_intrs = 0;
|
||||
double r_jk, theta, cos_theta, sin_xhz4, cos_xhz1, sin_theta2;
|
||||
double e_hb, exp_hb2, exp_hb3, CEhb1, CEhb2, CEhb3;
|
||||
rvec dcos_theta_di, dcos_theta_dj, dcos_theta_dk;
|
||||
@ -102,7 +101,6 @@ namespace ReaxFF {
|
||||
if (type_i < 0) continue;
|
||||
hbp = &(system->reax_param.hbp[type_i][type_j][type_k]);
|
||||
if (hbp->r0_hb <= 0.0) continue;
|
||||
++num_hb_intrs;
|
||||
|
||||
Calculate_Theta(pbond_ij->dvec, pbond_ij->d, dvec_jk, r_jk,
|
||||
&theta, &cos_theta);
|
||||
|
||||
@ -119,7 +119,6 @@ namespace ReaxFF {
|
||||
int type_i, type_j, type_k, type_l;
|
||||
int start_j, end_j;
|
||||
int start_pj, end_pj, start_pk, end_pk;
|
||||
int num_frb_intrs = 0;
|
||||
|
||||
double Delta_j, Delta_k;
|
||||
double r_ij, r_jk, r_kl, r_li;
|
||||
@ -242,7 +241,6 @@ namespace ReaxFF {
|
||||
if (i != l && fbh->cnt &&
|
||||
bo_kl->BO > control->thb_cut/*0*/ &&
|
||||
bo_ij->BO * bo_jk->BO * bo_kl->BO > control->thb_cut/*0*/) {
|
||||
++num_frb_intrs;
|
||||
r_kl = pbond_kl->d;
|
||||
BOA_kl = bo_kl->BO - control->thb_cut;
|
||||
|
||||
|
||||
@ -869,13 +869,11 @@ void FixShake::find_clusters()
|
||||
// else it's an error
|
||||
|
||||
flag = 0;
|
||||
int flag2 = 0;
|
||||
for (i = 0; i < nlocal; i++)
|
||||
for (j = 0; j < npartner[i]; j++) {
|
||||
if (partner_type[i][j] == 0) flag++;
|
||||
if (!(mask[i] & groupbit)) continue;
|
||||
if (!(partner_mask[i][j] & groupbit)) continue;
|
||||
if (partner_bondtype[i][j] == 0) flag2++;
|
||||
}
|
||||
|
||||
MPI_Allreduce(&flag,&flag_all,1,MPI_INT,MPI_SUM,world);
|
||||
|
||||
Reference in New Issue
Block a user