remove dead code and reduce trivial compiler warnings (clang++)
This commit is contained in:
@ -131,9 +131,8 @@ void FixWallGranRegion::init()
|
|||||||
void FixWallGranRegion::post_force(int vflag)
|
void FixWallGranRegion::post_force(int vflag)
|
||||||
{
|
{
|
||||||
int i,m,nc,iwall;
|
int i,m,nc,iwall;
|
||||||
double rinv,fx,fy,fz,tooclose;
|
|
||||||
double dx,dy,dz,rsq,meff;
|
double dx,dy,dz,rsq,meff;
|
||||||
double xc[3],vwall[3];
|
double vwall[3];
|
||||||
|
|
||||||
// do not update shear history during setup
|
// do not update shear history during setup
|
||||||
|
|
||||||
|
|||||||
@ -72,7 +72,7 @@ FixGCMC::FixGCMC(LAMMPS *lmp, int narg, char **arg) :
|
|||||||
Fix(lmp, narg, arg),
|
Fix(lmp, narg, arg),
|
||||||
idregion(NULL), full_flag(0), ngroups(0), groupstrings(NULL), ngrouptypes(0), grouptypestrings(NULL),
|
idregion(NULL), full_flag(0), ngroups(0), groupstrings(NULL), ngrouptypes(0), grouptypestrings(NULL),
|
||||||
grouptypebits(NULL), grouptypes(NULL), local_gas_list(NULL), atom_coord(NULL), random_equal(NULL), random_unequal(NULL),
|
grouptypebits(NULL), grouptypes(NULL), local_gas_list(NULL), atom_coord(NULL), random_equal(NULL), random_unequal(NULL),
|
||||||
coords(NULL), imageflags(NULL), idrigid(NULL), idshake(NULL), fixrigid(NULL), fixshake(NULL)
|
coords(NULL), imageflags(NULL), fixrigid(NULL), fixshake(NULL), idrigid(NULL), idshake(NULL)
|
||||||
{
|
{
|
||||||
if (narg < 11) error->all(FLERR,"Illegal fix gcmc command");
|
if (narg < 11) error->all(FLERR,"Illegal fix gcmc command");
|
||||||
|
|
||||||
|
|||||||
@ -964,22 +964,22 @@ void FixCMAP::bc_coeff(double *gs, double *d1gs, double *d2gs, double *d12gs)
|
|||||||
// calculate the bicubic interpolation coefficients c_ij
|
// calculate the bicubic interpolation coefficients c_ij
|
||||||
|
|
||||||
static int wt[16][16] =
|
static int wt[16][16] =
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, 0, 0, 0,-3, 3, 0, 0,-2,-1, 0, 0},
|
||||||
9,-9, 9,-9, 6, 3,-3,-6, 6,-6,-3, 3, 4, 2, 1, 2,
|
{9,-9, 9,-9, 6, 3,-3,-6, 6,-6,-3, 3, 4, 2, 1, 2},
|
||||||
-6, 6,-6, 6,-4,-2, 2, 4,-3, 3, 3,-3,-2,-1,-1,-2,
|
{-6, 6,-6, 6,-4,-2, 2, 4,-3, 3, 3,-3,-2,-1,-1,-2},
|
||||||
2,-2, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
{2,-2, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
|
||||||
0, 0, 0, 0, 0, 0, 0, 0, 2,-2, 0, 0, 1, 1, 0, 0,
|
{0, 0, 0, 0, 0, 0, 0, 0, 2,-2, 0, 0, 1, 1, 0, 0},
|
||||||
-6, 6,-6, 6,-3,-3, 3, 3,-4, 4, 2,-2,-2,-2,-1,-1,
|
{-6, 6,-6, 6,-3,-3, 3, 3,-4, 4, 2,-2,-2,-2,-1,-1},
|
||||||
4,-4, 4,-4, 2, 2,-2,-2, 2,-2,-2, 2, 1, 1, 1, 1
|
{4,-4, 4,-4, 2, 2,-2,-2, 2,-2,-2, 2, 1, 1, 1, 1}
|
||||||
};
|
};
|
||||||
|
|
||||||
int i, j, k, in;
|
int i, j, k, in;
|
||||||
|
|||||||
@ -67,11 +67,6 @@ void PairEAMOpt::eval()
|
|||||||
double rhor0j,rhor1j,rhor2j,rhor3j;
|
double rhor0j,rhor1j,rhor2j,rhor3j;
|
||||||
} fast_alpha_t;
|
} fast_alpha_t;
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
double frho0,frho1,frho2,frho3,frho4,frho5,frho6;
|
|
||||||
double _pad[1];
|
|
||||||
} fast_beta_t;
|
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
double rhor4i,rhor5i,rhor6i;
|
double rhor4i,rhor5i,rhor6i;
|
||||||
double rhor4j,rhor5j,rhor6j;
|
double rhor4j,rhor5j,rhor6j;
|
||||||
|
|||||||
@ -249,7 +249,7 @@ double FixQEqDynamic::compute_eneg()
|
|||||||
int FixQEqDynamic::pack_forward_comm(int n, int *list, double *buf,
|
int FixQEqDynamic::pack_forward_comm(int n, int *list, double *buf,
|
||||||
int pbc_flag, int *pbc)
|
int pbc_flag, int *pbc)
|
||||||
{
|
{
|
||||||
int m;
|
int m=0;
|
||||||
|
|
||||||
if( pack_flag == 1 )
|
if( pack_flag == 1 )
|
||||||
for(m = 0; m < n; m++) buf[m] = atom->q[list[m]];
|
for(m = 0; m < n; m++) buf[m] = atom->q[list[m]];
|
||||||
|
|||||||
@ -666,7 +666,6 @@ void FixRX::setup_pre_force(int vflag)
|
|||||||
int *mask = atom->mask;
|
int *mask = atom->mask;
|
||||||
int newton_pair = force->newton_pair;
|
int newton_pair = force->newton_pair;
|
||||||
double tmp;
|
double tmp;
|
||||||
int ii;
|
|
||||||
|
|
||||||
if(restartFlag){
|
if(restartFlag){
|
||||||
restartFlag = 0;
|
restartFlag = 0;
|
||||||
|
|||||||
@ -64,7 +64,6 @@ void NPairHalfBinNewtonSSA::build(NeighList *list)
|
|||||||
tagint **special = atom->special;
|
tagint **special = atom->special;
|
||||||
int **nspecial = atom->nspecial;
|
int **nspecial = atom->nspecial;
|
||||||
int nlocal = atom->nlocal;
|
int nlocal = atom->nlocal;
|
||||||
int nall = nlocal + atom->nghost;
|
|
||||||
if (includegroup) nlocal = atom->nfirst;
|
if (includegroup) nlocal = atom->nfirst;
|
||||||
int *ssaAIR = atom->ssaAIR;
|
int *ssaAIR = atom->ssaAIR;
|
||||||
|
|
||||||
|
|||||||
@ -640,10 +640,12 @@ double PairLJCutTholeLong::single(int i, int j, int itype, int jtype,
|
|||||||
if (j != di_closest){
|
if (j != di_closest){
|
||||||
if (drudetype[i] == CORE_TYPE) dqi = -atom->q[di];
|
if (drudetype[i] == CORE_TYPE) dqi = -atom->q[di];
|
||||||
else if (drudetype[i] == DRUDE_TYPE) dqi = atom->q[i];
|
else if (drudetype[i] == DRUDE_TYPE) dqi = atom->q[i];
|
||||||
|
else dqi = 0.0;
|
||||||
if (drudetype[j] == CORE_TYPE) {
|
if (drudetype[j] == CORE_TYPE) {
|
||||||
dj = atom->map(drudeid[j]);
|
dj = atom->map(drudeid[j]);
|
||||||
dqj = -atom->q[dj];
|
dqj = -atom->q[dj];
|
||||||
} else if (drudetype[j] == DRUDE_TYPE) dqj = atom->q[j];
|
} else if (drudetype[j] == DRUDE_TYPE) dqj = atom->q[j];
|
||||||
|
else dqj = 0.0;
|
||||||
asr = ascreen[itype][jtype] * r;
|
asr = ascreen[itype][jtype] * r;
|
||||||
exp_asr = exp(-asr);
|
exp_asr = exp(-asr);
|
||||||
dcoul = force->qqrd2e * dqi * dqj / r;
|
dcoul = force->qqrd2e * dqi * dqj / r;
|
||||||
|
|||||||
@ -283,9 +283,6 @@ void DumpNC::openfile()
|
|||||||
// Fixme! Perform checks if dimensions and variables conform with
|
// Fixme! Perform checks if dimensions and variables conform with
|
||||||
// data structure standard.
|
// data structure standard.
|
||||||
|
|
||||||
size_t index[NC_MAX_VAR_DIMS], count[NC_MAX_VAR_DIMS];
|
|
||||||
double d[1];
|
|
||||||
|
|
||||||
if (singlefile_opened) return;
|
if (singlefile_opened) return;
|
||||||
singlefile_opened = 1;
|
singlefile_opened = 1;
|
||||||
|
|
||||||
@ -924,7 +921,7 @@ int DumpNC::modify_param(int narg, char **arg)
|
|||||||
|
|
||||||
for (int i = 0; iarg < narg; iarg++, i++) {
|
for (int i = 0; iarg < narg; iarg++, i++) {
|
||||||
int n;
|
int n;
|
||||||
char *suffix;
|
char *suffix=NULL;
|
||||||
|
|
||||||
if (!strcmp(arg[iarg],"step")) {
|
if (!strcmp(arg[iarg],"step")) {
|
||||||
perframe[i].type = THIS_IS_A_BIGINT;
|
perframe[i].type = THIS_IS_A_BIGINT;
|
||||||
|
|||||||
@ -183,7 +183,6 @@ void FixNHAsphereOMP::nh_v_temp()
|
|||||||
#pragma omp parallel for default(none) private(i) schedule(static)
|
#pragma omp parallel for default(none) private(i) schedule(static)
|
||||||
#endif
|
#endif
|
||||||
for (i = 0; i < nlocal; i++) {
|
for (i = 0; i < nlocal; i++) {
|
||||||
double buf[3];
|
|
||||||
if (mask[i] & groupbit) {
|
if (mask[i] & groupbit) {
|
||||||
temperature->remove_bias(i,&v[i].x);
|
temperature->remove_bias(i,&v[i].x);
|
||||||
v[i].x *= factor_eta;
|
v[i].x *= factor_eta;
|
||||||
|
|||||||
@ -261,7 +261,6 @@ void FixNHOMP::nh_v_press()
|
|||||||
#pragma omp parallel for default(none) private(i) schedule(static)
|
#pragma omp parallel for default(none) private(i) schedule(static)
|
||||||
#endif
|
#endif
|
||||||
for (i = 0; i < nlocal; i++) {
|
for (i = 0; i < nlocal; i++) {
|
||||||
double buf[3];
|
|
||||||
if (mask[i] & groupbit) {
|
if (mask[i] & groupbit) {
|
||||||
temperature->remove_bias(i,&v[i].x);
|
temperature->remove_bias(i,&v[i].x);
|
||||||
v[i].x *= factor0;
|
v[i].x *= factor0;
|
||||||
@ -374,7 +373,6 @@ void FixNHOMP::nh_v_temp()
|
|||||||
#pragma omp parallel for default(none) private(i) schedule(static)
|
#pragma omp parallel for default(none) private(i) schedule(static)
|
||||||
#endif
|
#endif
|
||||||
for (i = 0; i < nlocal; i++) {
|
for (i = 0; i < nlocal; i++) {
|
||||||
double buf[3];
|
|
||||||
if (mask[i] & groupbit) {
|
if (mask[i] & groupbit) {
|
||||||
temperature->remove_bias(i,&v[i].x);
|
temperature->remove_bias(i,&v[i].x);
|
||||||
v[i].x *= factor_eta;
|
v[i].x *= factor_eta;
|
||||||
|
|||||||
@ -137,7 +137,6 @@ void FixNHSphereOMP::nh_v_temp()
|
|||||||
#pragma omp parallel for default(none) private(i) schedule(static)
|
#pragma omp parallel for default(none) private(i) schedule(static)
|
||||||
#endif
|
#endif
|
||||||
for (i = 0; i < nlocal; i++) {
|
for (i = 0; i < nlocal; i++) {
|
||||||
double buf[3];
|
|
||||||
if (mask[i] & groupbit) {
|
if (mask[i] & groupbit) {
|
||||||
temperature->remove_bias(i,&v[i].x);
|
temperature->remove_bias(i,&v[i].x);
|
||||||
v[i].x *= factor_eta;
|
v[i].x *= factor_eta;
|
||||||
|
|||||||
@ -121,7 +121,7 @@ void FixNVTSllodOMP::nh_v_temp()
|
|||||||
#pragma omp parallel for default(none) private(i) shared(h_two) schedule(static)
|
#pragma omp parallel for default(none) private(i) shared(h_two) schedule(static)
|
||||||
#endif
|
#endif
|
||||||
for (i = 0; i < nlocal; i++) {
|
for (i = 0; i < nlocal; i++) {
|
||||||
double vdelu0,vdelu1,vdelu2,buf[3];
|
double vdelu0,vdelu1,vdelu2;
|
||||||
if (mask[i] & groupbit) {
|
if (mask[i] & groupbit) {
|
||||||
vdelu0 = h_two[0]*v[i].x + h_two[5]*v[i].y + h_two[4]*v[i].z;
|
vdelu0 = h_two[0]*v[i].x + h_two[5]*v[i].y + h_two[4]*v[i].z;
|
||||||
vdelu1 = h_two[1]*v[i].y + h_two[3]*v[i].z;
|
vdelu1 = h_two[1]*v[i].y + h_two[3]*v[i].z;
|
||||||
|
|||||||
@ -1852,9 +1852,7 @@ double PairAIREBOOMP::bondorderLJ_thr(int i, int j, double rij[3], double rijmag
|
|||||||
double rikmag,rjlmag,cosjik,cosijl,g,tmp2,tmp3;
|
double rikmag,rjlmag,cosjik,cosijl,g,tmp2,tmp3;
|
||||||
double Etmp,pij,tmp,wij,dwij,NconjtmpI,NconjtmpJ;
|
double Etmp,pij,tmp,wij,dwij,NconjtmpI,NconjtmpJ;
|
||||||
double Nki,Nlj,dS,lamdajik,lamdaijl,dgdc,dgdN,pji,Nijconj,piRC;
|
double Nki,Nlj,dS,lamdajik,lamdaijl,dgdc,dgdN,pji,Nijconj,piRC;
|
||||||
double dcosjikdri[3],dcosijldri[3],dcosjikdrk[3];
|
double dN2[2],dN3[3],dwjl;
|
||||||
double dN2[2],dN3[3];
|
|
||||||
double dcosijldrj[3],dcosijldrl[3],dcosjikdrj[3],dwjl;
|
|
||||||
double Tij,crosskij[3],crosskijmag;
|
double Tij,crosskij[3],crosskijmag;
|
||||||
double crossijl[3],crossijlmag,omkijl;
|
double crossijl[3],crossijlmag,omkijl;
|
||||||
double tmppij,tmppji,dN2PIJ[2],dN2PJI[2],dN3piRC[3],dN3Tij[3];
|
double tmppij,tmppji,dN2PIJ[2],dN2PJI[2],dN3piRC[3],dN3Tij[3];
|
||||||
@ -1864,16 +1862,16 @@ double PairAIREBOOMP::bondorderLJ_thr(int i, int j, double rij[3], double rijmag
|
|||||||
double rlnmag,dwln,r23[3],r23mag,r21[3],r21mag;
|
double rlnmag,dwln,r23[3],r23mag,r21[3],r21mag;
|
||||||
double w21,dw21,r34[3],r34mag,cos234,w34,dw34;
|
double w21,dw21,r34[3],r34mag,cos234,w34,dw34;
|
||||||
double cross321[3],cross234[3],prefactor,SpN;
|
double cross321[3],cross234[3],prefactor,SpN;
|
||||||
double fcijpc,fcikpc,fcjlpc,fcjkpc,fcilpc;
|
double fcikpc,fcjlpc,fcjkpc,fcilpc;
|
||||||
double dt2dik[3],dt2djl[3],dt2dij[3],aa,aaa1,aaa2,at2,cw,cwnum,cwnom;
|
double dt2dik[3],dt2djl[3],aa,aaa1,aaa2,at2,cw,cwnum,cwnom;
|
||||||
double sin321,sin234,rr,rijrik,rijrjl,rjk2,rik2,ril2,rjl2;
|
double sin321,sin234,rr,rijrik,rijrjl,rjk2,rik2,ril2,rjl2;
|
||||||
double dctik,dctjk,dctjl,dctij,dctji,dctil,rik2i,rjl2i,sink2i,sinl2i;
|
double dctik,dctjk,dctjl,dctil,rik2i,rjl2i,sink2i,sinl2i;
|
||||||
double rjk[3],ril[3],dt1dik,dt1djk,dt1djl,dt1dil,dt1dij;
|
double rjk[3],ril[3],dt1dik,dt1djk,dt1djl,dt1dil;
|
||||||
double dNlj;
|
double dNlj;
|
||||||
double PijS,PjiS;
|
double PijS,PjiS;
|
||||||
double rij2,tspjik,dtsjik,tspijl,dtsijl,costmp;
|
double rij2,tspjik,dtsjik,tspijl,dtsijl,costmp;
|
||||||
int *REBO_neighs,*REBO_neighs_i,*REBO_neighs_j,*REBO_neighs_k,*REBO_neighs_l;
|
int *REBO_neighs,*REBO_neighs_i,*REBO_neighs_j,*REBO_neighs_k,*REBO_neighs_l;
|
||||||
double F12[3],F23[3],F34[3],F31[3],F24[3];
|
double F12[3],F34[3],F31[3],F24[3];
|
||||||
double fi[3],fj[3],fk[3],fl[3],f1[3],f2[3],f3[3],f4[4];
|
double fi[3],fj[3],fk[3],fl[3],f1[3],f2[3],f3[3],f4[4];
|
||||||
double rji[3],rki[3],rlj[3],r13[3],r43[3];
|
double rji[3],rki[3],rlj[3],r13[3],r43[3];
|
||||||
double realrij[3], realrijmag;
|
double realrij[3], realrijmag;
|
||||||
|
|||||||
@ -3561,7 +3561,7 @@ int PairSMTBQ::Tokenize( char* s, char*** tok )
|
|||||||
|
|
||||||
void PairSMTBQ::CheckEnergyVSForce()
|
void PairSMTBQ::CheckEnergyVSForce()
|
||||||
{
|
{
|
||||||
double drL,iq,jq,rsq,evdwlCoul,fpairCoul,eflag,ErepR,frepR,fpair,evdwl;
|
double drL,iq,jq,rsq,evdwlCoul,fpairCoul,eflag=0,ErepR,frepR,fpair,evdwl;
|
||||||
int i,j,iiiMax,iii,iCoord;
|
int i,j,iiiMax,iii,iCoord;
|
||||||
int itype,jtype,l,m;
|
int itype,jtype,l,m;
|
||||||
double r,t1,t2,sds,xi,engSurf,fforceSurf;
|
double r,t1,t2,sds,xi,engSurf,fforceSurf;
|
||||||
|
|||||||
@ -1449,7 +1449,7 @@ void CommTiled::box_drop_brick(int idim, double *lo, double *hi, int &indexme)
|
|||||||
// NOTE: these error messages are internal sanity checks
|
// NOTE: these error messages are internal sanity checks
|
||||||
// should not occur, can be removed at some point
|
// should not occur, can be removed at some point
|
||||||
|
|
||||||
int index,dir;
|
int index=-1,dir;
|
||||||
if (hi[idim] == sublo[idim]) {
|
if (hi[idim] == sublo[idim]) {
|
||||||
index = myloc[idim] - 1;
|
index = myloc[idim] - 1;
|
||||||
dir = -1;
|
dir = -1;
|
||||||
|
|||||||
@ -35,7 +35,7 @@ enum{TYPE,RADIUS};
|
|||||||
|
|
||||||
ComputePropertyLocal::ComputePropertyLocal(LAMMPS *lmp, int narg, char **arg) :
|
ComputePropertyLocal::ComputePropertyLocal(LAMMPS *lmp, int narg, char **arg) :
|
||||||
Compute(lmp, narg, arg),
|
Compute(lmp, narg, arg),
|
||||||
indices(NULL), pack_choice(NULL), vlocal(NULL), alocal(NULL)
|
vlocal(NULL), alocal(NULL), indices(NULL), pack_choice(NULL)
|
||||||
{
|
{
|
||||||
if (narg < 4) error->all(FLERR,"Illegal compute property/local command");
|
if (narg < 4) error->all(FLERR,"Illegal compute property/local command");
|
||||||
|
|
||||||
|
|||||||
@ -954,7 +954,7 @@ void Neighbor::morph_skip()
|
|||||||
int i,j,inewton,jnewton;
|
int i,j,inewton,jnewton;
|
||||||
NeighRequest *irq,*jrq,*nrq;
|
NeighRequest *irq,*jrq,*nrq;
|
||||||
|
|
||||||
for (int i = 0; i < nrequest; i++) {
|
for (i = 0; i < nrequest; i++) {
|
||||||
irq = requests[i];
|
irq = requests[i];
|
||||||
|
|
||||||
// only processing skip lists
|
// only processing skip lists
|
||||||
@ -1053,7 +1053,7 @@ void Neighbor::morph_skip()
|
|||||||
void Neighbor::morph_granular()
|
void Neighbor::morph_granular()
|
||||||
{
|
{
|
||||||
int i,j;
|
int i,j;
|
||||||
NeighRequest *irq,*jrq,*nrq;
|
NeighRequest *irq,*jrq;
|
||||||
|
|
||||||
for (i = 0; i < nrequest; i++) {
|
for (i = 0; i < nrequest; i++) {
|
||||||
irq = requests[i];
|
irq = requests[i];
|
||||||
|
|||||||
Reference in New Issue
Block a user