remove dead code and unused variables

This commit is contained in:
Axel Kohlmeyer
2020-06-30 16:32:30 -04:00
parent eafcc06670
commit edfb4076ff
7 changed files with 6 additions and 14 deletions

View File

@ -316,7 +316,6 @@ void PPPMDisp::init()
for (int i=0; i<=EWALD_MAXORDER; ++i) // transcribe order for (int i=0; i<=EWALD_MAXORDER; ++i) // transcribe order
if (ewald_order&(1<<i)) { // from pair_style if (ewald_order&(1<<i)) { // from pair_style
int k=0; int k=0;
char str[128];
switch (i) { switch (i) {
case 1: case 1:
k = 0; break; k = 0; break;

View File

@ -149,15 +149,13 @@ void MLIAPDescriptorSNAP::forward(int* map, NeighList* list, double **descriptor
void MLIAPDescriptorSNAP::backward(PairMLIAP* pairmliap, NeighList* list, double **beta, int vflag) void MLIAPDescriptorSNAP::backward(PairMLIAP* pairmliap, NeighList* list, double **beta, int vflag)
{ {
int i,j,jnum,ninside; int i,j,jnum,ninside;
double delx,dely,delz,evdwl,rsq; double delx,dely,delz,rsq;
double fij[3]; double fij[3];
int *jlist,*numneigh,**firstneigh; int *jlist,*numneigh,**firstneigh;
double **x = atom->x; double **x = atom->x;
double **f = atom->f; double **f = atom->f;
int *type = atom->type; int *type = atom->type;
int nlocal = atom->nlocal;
int newton_pair = force->newton_pair;
numneigh = list->numneigh; numneigh = list->numneigh;
firstneigh = list->firstneigh; firstneigh = list->firstneigh;

View File

@ -142,7 +142,6 @@ void MLIAPModel::read_coeffs(char *coefffilename)
} }
if (comm->me == 0) fclose(fpcoeff); if (comm->me == 0) fclose(fpcoeff);
} }
/* ---------------------------------------------------------------------- /* ----------------------------------------------------------------------
@ -153,9 +152,7 @@ double MLIAPModel::memory_usage()
{ {
double bytes = 0; double bytes = 0;
int n = atom->ntypes+1;
bytes += nelements*nparams*sizeof(double); // coeffelem bytes += nelements*nparams*sizeof(double); // coeffelem
return bytes; return bytes;
} }

View File

@ -586,9 +586,9 @@ void FixAdapt::change_settings()
// reset radius to new value, for both owned and ghost atoms // reset radius to new value, for both owned and ghost atoms
// also reset rmass to new value assuming density remains constant // also reset rmass to new value assuming density remains constant
// for scaleflag, previous_diam_scale is the scale factor on previous step // for scaleflag, previous_diam_scale is the scale factor on previous step
if (ad->aparam == DIAMETER) { if (ad->aparam == DIAMETER) {
double density,scale; double scale;
double *radius = atom->radius; double *radius = atom->radius;
double *rmass = atom->rmass; double *rmass = atom->rmass;
int *mask = atom->mask; int *mask = atom->mask;
@ -691,14 +691,14 @@ void FixAdapt::restore_settings()
} else if (ad->which == ATOM) { } else if (ad->which == ATOM) {
if (diamflag) { if (diamflag) {
double density,scale; double scale;
double *vec = fix_diam->vstore; double *vec = fix_diam->vstore;
double *radius = atom->radius; double *radius = atom->radius;
double *rmass = atom->rmass; double *rmass = atom->rmass;
int *mask = atom->mask; int *mask = atom->mask;
int nlocal = atom->nlocal; int nlocal = atom->nlocal;
if (scaleflag) scale = previous_diam_scale; if (scaleflag) scale = previous_diam_scale;
for (int i = 0; i < nlocal; i++) for (int i = 0; i < nlocal; i++)

View File

@ -793,7 +793,6 @@ bool Info::is_active(const char *category, const char *name)
{ {
if ((category == NULL) || (name == NULL)) return false; if ((category == NULL) || (name == NULL)) return false;
const char *style = "none"; const char *style = "none";
const int len = strlen(name);
if (strcmp(category,"package") == 0) { if (strcmp(category,"package") == 0) {
if (strcmp(name,"gpu") == 0) { if (strcmp(name,"gpu") == 0) {

View File

@ -1438,7 +1438,7 @@ void Neighbor::init_topology()
void Neighbor::print_pairwise_info() void Neighbor::print_pairwise_info()
{ {
int i,m; int i;
NeighRequest *rq; NeighRequest *rq;
const double cutghost = MAX(cutneighmax,comm->cutghostuser); const double cutghost = MAX(cutneighmax,comm->cutghostuser);

View File

@ -70,7 +70,6 @@ void PairTable::compute(int eflag, int vflag)
int i,j,ii,jj,inum,jnum,itype,jtype,itable; int i,j,ii,jj,inum,jnum,itype,jtype,itable;
double xtmp,ytmp,ztmp,delx,dely,delz,evdwl,fpair; double xtmp,ytmp,ztmp,delx,dely,delz,evdwl,fpair;
double rsq,factor_lj,fraction,value,a,b; double rsq,factor_lj,fraction,value,a,b;
char estr[128];
int *ilist,*jlist,*numneigh,**firstneigh; int *ilist,*jlist,*numneigh,**firstneigh;
Table *tb; Table *tb;