handle dead code

This commit is contained in:
Axel Kohlmeyer
2022-12-05 18:01:23 -05:00
parent 20f568e1ae
commit 69d402fa7b

View File

@ -1641,39 +1641,37 @@ void MLPOD::InitSnap()
double rcutmax = 0.0; double rcutmax = 0.0;
for (int ielem = 0; ielem < ntypes; ielem++) for (int ielem = 0; ielem < ntypes; ielem++)
rcutmax = MAX(2.0*elemradius[ielem]*rcutfac,rcutmax); rcutmax = MAX(2.0*elemradius[ielem]*rcutfac,rcutmax);
snapSetup(twojmax, ntypes); snapSetup(twojmax, ntypes);
//TemplateCopytoDevice(&sna.radelem[1], elemradius, ntypes, backend);
//TemplateCopytoDevice(&sna.wjelem[1], elemweight, ntypes, backend);
for (int i=0; i<ntypes; i++) { for (int i=0; i<ntypes; i++) {
sna.radelem[1+i] = elemradius[i]; sna.radelem[1+i] = elemradius[i];
sna.wjelem[1+i] = elemweight[i]; sna.wjelem[1+i] = elemweight[i];
} }
podArrayFill(&sna.map[1], (int) 0, ntypes); podArrayFill(&sna.map[1], (int) 0, ntypes);
//double cutsq[100]; for (int i=0; i<ntypes; i++) {
for (int i=0; i<ntypes; i++)
for (int j=0; j<ntypes; j++) { for (int j=0; j<ntypes; j++) {
double cut = (elemradius[i] + elemradius[j])*rcutfac; double cut = (elemradius[i] + elemradius[j])*rcutfac;
sna.rcutsq[j+1 + (i+1)*(ntypes+1)] = cut*cut; sna.rcutsq[j+1 + (i+1)*(ntypes+1)] = cut*cut;
} }
//TemplateCopytoDevice(sna.rcutsq, cutsq, (ntypes+1)*(ntypes+1), backend); }
// bzeroflag is currently always 0
#if 0
if (bzeroflag) { if (bzeroflag) {
double www = wself*wself*wself; double www = wself*wself*wself;
//double bzero[100];
for (int j = 0; j <= twojmax; j++) for (int j = 0; j <= twojmax; j++)
if (bnormflag) if (bnormflag)
sna.bzero[j] = www; sna.bzero[j] = www;
else else
sna.bzero[j] = www*(j+1); sna.bzero[j] = www*(j+1);
//TemplateCopytoDevice(sna.bzero, bzero, twojmax+1, backend);
} }
#endif
int nelements = ntypes; int nelements = ntypes;
if (!chemflag) if (!chemflag)
nelements = 1; nelements = 1;
sna.nelements = nelements; sna.nelements = nelements;
sna.ndoubles = nelements*nelements; // number of multi-element pairs sna.ndoubles = nelements*nelements; // number of multi-element pairs
@ -2599,7 +2597,6 @@ void MLPOD::pod3body(double *eatom, double *yij, double *e2ij, double *tmpmem, i
costhe = xdot/(rij*rik); costhe = xdot/(rij*rik);
costhe = costhe > 1.0 ? 1.0 : costhe; costhe = costhe > 1.0 ? 1.0 : costhe;
costhe = costhe < -1.0 ? -1.0 : costhe; costhe = costhe < -1.0 ? -1.0 : costhe;
xdot = costhe*(rij*rik);
theta = acos(costhe); theta = acos(costhe);
for (int p=0; p <nabf1; p++) for (int p=0; p <nabf1; p++)