remove dead code

This commit is contained in:
Axel Kohlmeyer 2019-10-19 11:44:56 -04:00
parent bf537dedf5
commit 95c515420a
No known key found for this signature in database
GPG Key ID: D9B44E93BF0C375A
3 changed files with 15 additions and 43 deletions

View File

@ -105,7 +105,7 @@ void PairBodyRoundedPolygon::compute(int eflag, int vflag)
int ni,nj,npi,npj,ifirst,jfirst;
int nei,nej,iefirst,jefirst;
double xtmp,ytmp,ztmp,delx,dely,delz,evdwl;
double rsq,rsqinv,r,radi,radj,eradi,eradj,rradi,rradj,k_nij,k_naij;
double rsq,r,radi,radj,k_nij,k_naij;
double facc[3];
int *ilist,*jlist,*numneigh,**firstneigh;
@ -170,8 +170,6 @@ void PairBodyRoundedPolygon::compute(int eflag, int vflag)
ifirst = dfirst[i];
nei = ednum[i];
iefirst = edfirst[i];
eradi = enclosing_radius[i];
rradi = rounded_radius[i];
}
for (jj = 0; jj < jnum; jj++) {
@ -197,8 +195,6 @@ void PairBodyRoundedPolygon::compute(int eflag, int vflag)
jfirst = dfirst[j];
nej = ednum[j];
jefirst = edfirst[j];
eradj = enclosing_radius[j];
rradj = rounded_radius[j];
k_nij = k_n[itype][jtype];
k_naij = k_na[itype][jtype];
@ -207,7 +203,6 @@ void PairBodyRoundedPolygon::compute(int eflag, int vflag)
r = sqrt(rsq);
if (r > radi + radj + cut_inner) continue;
rsqinv = 1.0 / rsq;
if (npi == 1 && npj == 1) {
sphere_against_sphere(i, j, delx, dely, delz, rsq,
@ -598,16 +593,13 @@ void PairBodyRoundedPolygon::sphere_against_sphere(int i, int j,
double k_n, double k_na, double** /*x*/, double** v,
double** f, int evflag)
{
double eradi,eradj,rradi,rradj;
double rradi,rradj;
double vr1,vr2,vr3,vnnr,vn1,vn2,vn3,vt1,vt2,vt3;
double rij,rsqinv,R,fx,fy,fz,fn[3],ft[3],fpair,shift,energy;
double rij,rsqinv,R,fx,fy,fz,fpair,shift,energy;
int nlocal = atom->nlocal;
int newton_pair = force->newton_pair;
eradi = enclosing_radius[i];
rradi = rounded_radius[i];
eradj = enclosing_radius[j];
rradj = rounded_radius[j];
rsqinv = 1.0/rsq;
@ -649,19 +641,6 @@ void PairBodyRoundedPolygon::sphere_against_sphere(int i, int j,
vt1 = vr1 - vn1;
vt2 = vr2 - vn2;
vt3 = vr3 - vn3;
// normal friction term at contact
fn[0] = -c_n * vn1;
fn[1] = -c_n * vn2;
fn[2] = -c_n * vn3;
// tangential friction term at contact
// excluding the tangential deformation term
ft[0] = -c_t * vt1;
ft[1] = -c_t * vt2;
ft[2] = -c_t * vt3;
}
f[i][0] += fx;
@ -703,20 +682,16 @@ int PairBodyRoundedPolygon::vertex_against_edge(int i, int j,
int &num_contacts,
double &evdwl, double* facc)
{
int ni, npi, ifirst, nei, iefirst;
int nj, npj, jfirst, nej, jefirst;
double xpi[3], xpj[3], dist, eradi, eradj, rradi, rradj;
int ni, npi, ifirst;
int nj, jfirst, nej, jefirst;
double xpi[3], xpj[3], dist, eradj, rradi, rradj;
double fx, fy, fz, energy;
int interact;
npi = dnum[i];
ifirst = dfirst[i];
nei = ednum[i];
iefirst = edfirst[i];
eradi = enclosing_radius[i];
rradi = rounded_radius[i];
npj = dnum[j];
jfirst = dfirst[j];
nej = ednum[j];
jefirst = edfirst[j];

View File

@ -271,7 +271,7 @@ void PairBodyRoundedPolyhedron::compute(int eflag, int vflag)
continue;
}
int interact, num_contacts;
int num_contacts;
Contact contact_list[MAX_CONTACTS];
num_contacts = 0;
@ -280,22 +280,22 @@ void PairBodyRoundedPolyhedron::compute(int eflag, int vflag)
#ifdef _POLYHEDRON_DEBUG
printf("INTERACTION between edges of %d vs. faces of %d:\n", i, j);
#endif
interact = edge_against_face(i, j, itype, jtype, x, contact_list,
num_contacts, evdwl, facc);
edge_against_face(i, j, itype, jtype, x, contact_list,
num_contacts, evdwl, facc);
// check interaction between j's edges and i' faces
#ifdef _POLYHEDRON_DEBUG
printf("\nINTERACTION between edges of %d vs. faces of %d:\n", j, i);
#endif
interact = edge_against_face(j, i, jtype, itype, x, contact_list,
num_contacts, evdwl, facc);
edge_against_face(j, i, jtype, itype, x, contact_list,
num_contacts, evdwl, facc);
// check interaction between i's edges and j' edges
#ifdef _POLYHEDRON_DEBUG
printf("INTERACTION between edges of %d vs. edges of %d:\n", i, j);
#endif
interact = edge_against_edge(i, j, itype, jtype, x, contact_list,
num_contacts, evdwl, facc);
edge_against_edge(i, j, itype, jtype, x, contact_list,
num_contacts, evdwl, facc);
// estimate the contact area
// also consider point contacts and line contacts
@ -2341,13 +2341,11 @@ void PairBodyRoundedPolyhedron::find_unique_contacts(Contact* contact_list,
void PairBodyRoundedPolyhedron::sanity_check()
{
double x1[3],x2[3],x3[3],x4[3],h_a[3],h_b[3],d_a,d_b;
double x1[3],x2[3],h_a[3],h_b[3],d_a,d_b;
double a[3],b[3],t_a,t_b;
x1[0] = 0; x1[1] = 3; x1[2] = 0;
x2[0] = 3; x2[1] = 0; x2[2] = 0;
x3[0] = 4; x3[1] = 3; x3[2] = 0;
x4[0] = 5; x4[1] = 3; x4[2] = 0;
a[0] = 0; a[1] = 0; a[2] = 0;
b[0] = 4; b[1] = 0; b[2] = 0;

View File

@ -549,7 +549,7 @@ void PairKolmogorovCrespiFull::calc_FRep(int eflag, int /* vflag */)
int i,j,ii,jj,inum,jnum,itype,jtype,k,kk;
double prodnorm1,fkcx,fkcy,fkcz;
double xtmp,ytmp,ztmp,delx,dely,delz,evdwl,fpair,fpair1;
double rsq,r,rhosq1,exp0,exp1,r2inv,Tap,dTap,Vkc;
double rsq,r,rhosq1,exp0,exp1,Tap,dTap,Vkc;
double frho_ij,sumC1,sumC11,sumCff,fsum,rho_ij;
int *ilist,*jlist,*numneigh,**firstneigh;
int *KC_neighs_i;
@ -606,7 +606,6 @@ void PairKolmogorovCrespiFull::calc_FRep(int eflag, int /* vflag */)
Param& p = params[iparam_ij];
r = sqrt(rsq);
r2inv = 1.0/rsq;
// turn on/off taper function
if (tap_flag) {