reduce compiler warnings in USER-AWPMD
This commit is contained in:
@ -43,12 +43,12 @@ enum vbLEVELS{
|
||||
template<class exc_t>
|
||||
struct log_exception_traits{
|
||||
/// exeption level according to the vbLEVELS
|
||||
static int level(const exc_t &signal){ return vblFATAL; }
|
||||
static int level(const exc_t & /* signal */){ return vblFATAL; }
|
||||
/// the string name of exception category
|
||||
static string name(const exc_t &signal){ return typeid(exc_t).name();}
|
||||
static string name(const exc_t & /* signal */){ return typeid(exc_t).name();}
|
||||
/// adds some more explanations to the description
|
||||
/// default behaviour: nothing done
|
||||
static exc_t add_words(const exc_t &orig, const char *words){
|
||||
static exc_t add_words(const exc_t &orig, const char * /* words */){
|
||||
return orig;
|
||||
}
|
||||
};
|
||||
@ -80,7 +80,7 @@ struct log_exception_traits<int>{
|
||||
return "integer exception";*/
|
||||
}
|
||||
/// default behaviour: nothing done
|
||||
static int add_words(const int &orig, const char *words){
|
||||
static int add_words(const int &orig, const char * /* words */){
|
||||
return orig;
|
||||
}
|
||||
};
|
||||
@ -90,14 +90,11 @@ template<>
|
||||
struct log_exception_traits<enum vbLEVELS>{
|
||||
static int level(const enum vbLEVELS &signal){ return log_exception_traits<int>::level(signal); }
|
||||
static string name(const enum vbLEVELS &signal){ return log_exception_traits<int>::name(signal); }
|
||||
static enum vbLEVELS add_words(const enum vbLEVELS &orig, const char *words){
|
||||
static enum vbLEVELS add_words(const enum vbLEVELS &orig, const char * /* words */){
|
||||
return orig;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
/// Logger class to control (computational) function behaviour when something requiring user attention has happened.
|
||||
/// message(signal,errcode, text) is used to either throw an exception or return errorcode
|
||||
/// At first, the the level of error is determined via log_exception_traits<>::level(signal)
|
||||
@ -205,7 +202,7 @@ public:
|
||||
return errcode;
|
||||
}
|
||||
|
||||
virtual void log_text(int level, const char *messtype, const char *messtext){
|
||||
virtual void log_text(int /* level */, const char *messtype, const char *messtext){
|
||||
if(descriptor!="") // descriptor is used as header
|
||||
printf("%s:\n",descriptor.c_str());
|
||||
if(string(messtype)!=string(""))
|
||||
|
||||
@ -324,7 +324,7 @@ public:
|
||||
}
|
||||
|
||||
//e initializes by unmanaged pointer
|
||||
sqmatrix(size_t n, T *ptr):size(n){
|
||||
sqmatrix(size_t n, T * /* ptr */):size(n){
|
||||
init(n);
|
||||
}
|
||||
|
||||
|
||||
@ -24,7 +24,7 @@ class WavePacket;
|
||||
///\en Template for v=der operation in \ref Wavepacket::int2phys_der()
|
||||
template<class Type>
|
||||
struct eq_second : public binary_function <Type, Type, Type> {
|
||||
Type operator()(const Type& _Left, const Type& _Right) const{
|
||||
Type operator()(const Type& /* _Left */, const Type& _Right) const{
|
||||
return _Right;
|
||||
}
|
||||
};
|
||||
@ -32,7 +32,7 @@ struct eq_second : public binary_function <Type, Type, Type> {
|
||||
///\en Template for v=-der operation in \ref Wavepacket::int2phys_der()
|
||||
template<class Type>
|
||||
struct eq_minus_second : public binary_function <Type, Type, Type> {
|
||||
Type operator()(const Type& _Left, const Type& _Right) const{
|
||||
Type operator()(const Type& /* _Left */, const Type& _Right) const{
|
||||
return -_Right;
|
||||
}
|
||||
};
|
||||
|
||||
@ -425,7 +425,7 @@ public:
|
||||
/// calculated only once based on particle tags)
|
||||
/// If force multiplier is zero, then the term may be omitted (energy will also be zero).
|
||||
/// NOW ASSIGNS BASED ON THE FIRST PAIR ONLY
|
||||
pair<double, double> check_part1(int s1,int icj1,int ick2, int s2=-1,int icj3=-1,int ick4=-1){
|
||||
pair<double, double> check_part1(int s1,int icj1,int ick2){
|
||||
int res=check_ee(s1,icj1,ick2);
|
||||
if(res==1){ // my term
|
||||
//printf(" *\n");
|
||||
|
||||
@ -331,7 +331,7 @@ void AWPMD_split::get_el_forces(int flag, Vector_3P fe_x,
|
||||
fe_pw[ic1+k1]+=E_der[s1][indw1+8*k1+1]/(2*w*h_plank);
|
||||
for(int i=0;i<3;i++){
|
||||
fe_x[ic1+k1][i]+= -2*real(wk.a)*E_der[s1][indw1+8*k1+2+2*i]-2*imag(wk.a)*E_der[s1][indw1+8*k1+2+2*i+1];
|
||||
fe_p[ic1+k1][i]+= (-E_der[s1][indw1+8*k1+2+2*i+1])*(m_electron/h_plank); //*(h_plank/m_electron);
|
||||
fe_p[ic1+k1][i]+= (-E_der[s1][indw1+8*k1+2+2*i+1])*(m_electron/h_plank); // *(h_plank/m_electron);
|
||||
fe_pw[ic1+k1]+=(r[i]*E_der[s1][indw1+8*k1+2+2*i+1]/w)/h_plank;
|
||||
fe_w[ic1+k1]+=2*r[i]*(t*E_der[s1][indw1+8*k1+2+2*i]+imag(wk.a)*E_der[s1][indw1+8*k1+2+2*i+1]/w);
|
||||
}*/
|
||||
@ -368,7 +368,6 @@ int AWPMD_split::interaction_hartree(int flag, Vector_3P fi, Vector_3P fe_x,
|
||||
|
||||
for(int c1=0;c1<ne[s1];c1++){
|
||||
// calculating single-electron quantities within block
|
||||
double Ee1=0., Ew1=0., Eei1=0.;
|
||||
double pref=-h2_me/(2*wf_norm[s1][c1]); // ekin
|
||||
double pref_ei=coul_pref/wf_norm[s1][c1];
|
||||
|
||||
@ -502,7 +501,6 @@ int AWPMD_split::interaction_hartree(int flag, Vector_3P fi, Vector_3P fe_x,
|
||||
continue;
|
||||
|
||||
double pref_ee=coul_pref/(wf_norm[s1][c1]*wf_norm[s2][c2]);
|
||||
double dE=0.;
|
||||
for(int j2=0;j2<nspl[s2][c2];j2++){
|
||||
|
||||
cdouble cj2(split_c[s2][ic2+j2][0],split_c[s2][ic2+j2][1]);
|
||||
@ -513,9 +511,8 @@ int AWPMD_split::interaction_hartree(int flag, Vector_3P fi, Vector_3P fe_x,
|
||||
o2.set1(wj2);
|
||||
|
||||
for(int k2=j2;k2<nspl[s2][c2];k2++){
|
||||
int M2a=(j2==k2 ? 1: 2);
|
||||
double M2e, M2f;
|
||||
_mytie(M2e,M2f)=check_part1(s1,ic1+j1,ic1+k1,s2,ic2+j2,ic2+k2);
|
||||
_mytie(M2e,M2f)=check_part1(s1,ic1+j1,ic1+k1);
|
||||
|
||||
cdouble ck2(split_c[s2][ic2+k2][0],split_c[s2][ic2+k2][1]);
|
||||
|
||||
@ -1180,7 +1177,7 @@ int AWPMD_split::interaction(int flag, Vector_3P fi, Vector_3P fe_x,
|
||||
M0= (c1==c2 && c3==c4 ? 1: 2); // will have exchange term for different pairs instead of M12*M34 factor
|
||||
}
|
||||
double Me, Mf;
|
||||
_mytie(Me,Mf)=check_part1(s1,ic1+j1,ic2+k2,s2,ic3+j3,ic4+k4)*M0;
|
||||
_mytie(Me,Mf)=check_part1(s1,ic1+j1,ic2+k2)*M0;
|
||||
if(!Mf)
|
||||
continue;
|
||||
|
||||
@ -1322,4 +1319,4 @@ int AWPMD_split::interaction(int flag, Vector_3P fi, Vector_3P fe_x,
|
||||
interaction_ii(flag,fi);
|
||||
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user