Commit 38843c54 by Francois Gygi

### Removed unused variables

parent 211d90a8
 ... @@ -80,7 +80,7 @@ vector > &rp) const ... @@ -80,7 +80,7 @@ vector > &rp) const D3vector r3(pr3); D3vector r3(pr3); D3vector g1,g2,g3; D3vector g1,g2,g3; grad_sigma(r1,r2,r3,g1,g2,g3); grad_sigma(r1,r2,r3,g1,g2,g3); const double a = bond_angle(r1,r2,r3); // const double a = bond_angle(r1,r2,r3); double ng = g1*g1 + g2*g2 + g3*g3; double ng = g1*g1 + g2*g2 + g3*g3; assert(ng>=0.0); assert(ng>=0.0); ... @@ -358,9 +358,9 @@ void AngleConstraint::grad_sigma(const D3vector &r1, const D3vector &r2, ... @@ -358,9 +358,9 @@ void AngleConstraint::grad_sigma(const D3vector &r1, const D3vector &r2, // angle is large enough. Use finite differences // angle is large enough. Use finite differences //cout << " ========= grad_sigma using finite differences" << endl; //cout << " ========= grad_sigma using finite differences" << endl; const double r12_inv = 1.0/length(r12); // const double r12_inv = 1.0/length(r12); const double r32_inv = 1.0/length(r32); // const double r32_inv = 1.0/length(r32); const double a = bond_angle(r1,r2,r3); // const double a = bond_angle(r1,r2,r3); const double l12 = length(r1-r2); const double l12 = length(r1-r2); const double l32 = length(r3-r2); const double l32 = length(r3-r2); ... ...
 ... @@ -682,7 +682,6 @@ void AtomSet::reset_rotation(void) ... @@ -682,7 +682,6 @@ void AtomSet::reset_rotation(void) // correct velocities: v = v - omega ^ r // correct velocities: v = v - omega ^ r for ( int is = 0; is < vt.size(); is++ ) for ( int is = 0; is < vt.size(); is++ ) { { double mass = species_list[is]->mass(); for ( int ia = 0; ia < na(is); ia++ ) for ( int ia = 0; ia < na(is); ia++ ) { { D3vector r(rt[is][3*ia+0],rt[is][3*ia+1],rt[is][3*ia+2]); D3vector r(rt[is][3*ia+0],rt[is][3*ia+1],rt[is][3*ia+2]); ... ...
 ... @@ -862,7 +862,7 @@ void BOSampleStepper::step(int niter) ... @@ -862,7 +862,7 @@ void BOSampleStepper::step(int niter) // if ( onpe0 && nite_ > 0 ) // if ( onpe0 && nite_ > 0 ) // cout << " delta_ehart = " << delta_ehart << endl; // cout << " delta_ehart = " << delta_ehart << endl; int ite = 0; int ite = 0; double energy, etotal_int; double etotal_int; double eigenvalue_sum, eigenvalue_sum_m = 0.0; double eigenvalue_sum, eigenvalue_sum_m = 0.0; // if nite == 0: do 1 iteration, no screening in charge mixing // if nite == 0: do 1 iteration, no screening in charge mixing ... @@ -871,7 +871,7 @@ void BOSampleStepper::step(int niter) ... @@ -871,7 +871,7 @@ void BOSampleStepper::step(int niter) while ( !nonscf_converged && ite < max(nite_,1) ) while ( !nonscf_converged && ite < max(nite_,1) ) { { tmap["energy"].start(); tmap["energy"].start(); energy = ef_.energy(true,dwf,false,fion,false,sigma_eks); ef_.energy(true,dwf,false,fion,false,sigma_eks); tmap["energy"].stop(); tmap["energy"].stop(); // compute the sum of eigenvalues (with fixed weight) // compute the sum of eigenvalues (with fixed weight) ... ...
 ... @@ -120,7 +120,7 @@ int Base64Transcoder::decode(const int nchars, const char* const from, ... @@ -120,7 +120,7 @@ int Base64Transcoder::decode(const int nchars, const char* const from, // nchars: number of chars in array "from" // nchars: number of chars in array "from" // the number of bytes successfully translated is returned // the number of bytes successfully translated is returned byte a0,a1,a2,a3,b0,b1,b2,b3; byte a2,a3,b0,b1,b2,b3; int c; int c; const char* fptr = from; const char* fptr = from; const char* const fptr_end = from+nchars+1; const char* const fptr_end = from+nchars+1; ... @@ -142,7 +142,7 @@ int Base64Transcoder::decode(const int nchars, const char* const from, ... @@ -142,7 +142,7 @@ int Base64Transcoder::decode(const int nchars, const char* const from, #endif #endif break; break; } } a0 = (byte) c; // a0 = (byte) c; b0 = (byte) dtable[c]; b0 = (byte) dtable[c]; do do ... @@ -158,7 +158,7 @@ int Base64Transcoder::decode(const int nchars, const char* const from, ... @@ -158,7 +158,7 @@ int Base64Transcoder::decode(const int nchars, const char* const from, #endif #endif break; break; } } a1 = (byte) c; // a1 = (byte) c; b1 = (byte) dtable[c]; b1 = (byte) dtable[c]; do do ... ...
 ... @@ -401,7 +401,8 @@ void Bisection::compute_transform(const SlaterDet& sd, int maxsweep, double tol) ... @@ -401,7 +401,8 @@ void Bisection::compute_transform(const SlaterDet& sd, int maxsweep, double tol) // adiag_ is resized by jade // adiag_ is resized by jade // diagonalize projectors // diagonalize projectors int nsweep = jade(maxsweep,tol,amat_,*u_,adiag_); // int nsweep = jade(maxsweep,tol,amat_,*u_,adiag_); jade(maxsweep,tol,amat_,*u_,adiag_); #ifdef TIMING #ifdef TIMING if ( ctxt_.onpe0() ) if ( ctxt_.onpe0() ) cout << "Bisection::compute_transform: nsweep=" << nsweep cout << "Bisection::compute_transform: nsweep=" << nsweep ... ...
 ... @@ -134,7 +134,6 @@ void CPSampleStepper::step(int niter) ... @@ -134,7 +134,6 @@ void CPSampleStepper::step(int niter) ef_.update_vhxc(compute_stress); ef_.update_vhxc(compute_stress); double energy = double energy = ef_.energy(compute_hpsi,dwf,compute_forces,fion,compute_stress,sigma_eks); ef_.energy(compute_hpsi,dwf,compute_forces,fion,compute_stress,sigma_eks); double enthalpy = ef_.enthalpy(); mdwf_stepper->compute_wfm(dwf); mdwf_stepper->compute_wfm(dwf); ... @@ -254,7 +253,7 @@ void CPSampleStepper::step(int niter) ... @@ -254,7 +253,7 @@ void CPSampleStepper::step(int niter) ef_.update_vhxc(compute_stress); ef_.update_vhxc(compute_stress); energy = energy = ef_.energy(compute_hpsi,dwf,compute_forces,fion,compute_stress,sigma_eks); ef_.energy(compute_hpsi,dwf,compute_forces,fion,compute_stress,sigma_eks); enthalpy = ef_.enthalpy(); ef_.enthalpy(); if ( s_.ctxt_.mype() == 0 ) if ( s_.ctxt_.mype() == 0 ) cout << "" << endl; cout << "" << endl; ... ...
 ... @@ -409,7 +409,6 @@ double EnergyFunctional::energy(bool compute_hpsi, Wavefunction& dwf, ... @@ -409,7 +409,6 @@ double EnergyFunctional::energy(bool compute_hpsi, Wavefunction& dwf, const double weight = wf.weight(ikp); const double weight = wf.weight(ikp); const SlaterDet& sd = *(wf.sd(ispin,ikp)); const SlaterDet& sd = *(wf.sd(ispin,ikp)); const Basis& wfbasis = sd.basis(); const Basis& wfbasis = sd.basis(); const D3vector kp = wfbasis.kpoint(); // factor fac in next lines: 2.0 for G and -G (if basis is real) and // factor fac in next lines: 2.0 for G and -G (if basis is real) and // 0.5 from 1/(2m) // 0.5 from 1/(2m) const double fac = wfbasis.real() ? 1.0 : 0.5; const double fac = wfbasis.real() ? 1.0 : 0.5; ... ...
 ... @@ -198,7 +198,8 @@ void MLWFTransform::update(void) ... @@ -198,7 +198,8 @@ void MLWFTransform::update(void) //////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////// void MLWFTransform::compute_transform(void) void MLWFTransform::compute_transform(void) { { int nsweep = jade(maxsweep_,tol_,a_,*u_,adiag_); // int nsweep = jade(maxsweep_,tol_,a_,*u_,adiag_); jade(maxsweep_,tol_,a_,*u_,adiag_); } } //////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////// ... ...
 ... @@ -287,9 +287,6 @@ int PlotCmd::action(int argc, char **argv) ... @@ -287,9 +287,6 @@ int PlotCmd::action(int argc, char **argv) bool compute_stress = false; bool compute_stress = false; ef.update_vhxc(compute_stress); ef.update_vhxc(compute_stress); FourierTransform *vft = cd.vft(); Basis *vbasis = cd.vbasis(); tmpr.resize(cd.vft()->np012()); tmpr.resize(cd.vft()->np012()); np0 = cd.vft()->np0(); np0 = cd.vft()->np0(); np1 = cd.vft()->np1(); np1 = cd.vft()->np1(); ... ...
 ... @@ -127,7 +127,6 @@ void SampleReader::readSample (Sample& s, const string uri, bool serial) ... @@ -127,7 +127,6 @@ void SampleReader::readSample (Sample& s, const string uri, bool serial) parser->setFeature(XMLUni::fgXercesSchemaFullChecking, schemaFullChecking); parser->setFeature(XMLUni::fgXercesSchemaFullChecking, schemaFullChecking); parser->setFeature(XMLUni::fgSAX2CoreNameSpacePrefixes, namespacePrefixes); parser->setFeature(XMLUni::fgSAX2CoreNameSpacePrefixes, namespacePrefixes); int errorCount = 0; SampleHandler* s_handler = new SampleHandler(s,gfdata); SampleHandler* s_handler = new SampleHandler(s,gfdata); try try ... @@ -140,7 +139,7 @@ void SampleReader::readSample (Sample& s, const string uri, bool serial) ... @@ -140,7 +139,7 @@ void SampleReader::readSample (Sample& s, const string uri, bool serial) if ( onpe0 ) cout << " Starting XML parsing" << endl; if ( onpe0 ) cout << " Starting XML parsing" << endl; parser->parse(*memBufIS); parser->parse(*memBufIS); if ( onpe0 ) cout << " XML parsing done" << endl; if ( onpe0 ) cout << " XML parsing done" << endl; errorCount = parser->getErrorCount(); // errorCount = parser->getErrorCount(); } } catch (const XMLException& toCatch) catch (const XMLException& toCatch) ... ...
 ... @@ -86,8 +86,6 @@ void SpeciesReader::uri_to_species(const string uri, Species& sp) ... @@ -86,8 +86,6 @@ void SpeciesReader::uri_to_species(const string uri, Species& sp) parser->setFeature(XMLUni::fgXercesSchemaFullChecking, schemaFullChecking); parser->setFeature(XMLUni::fgXercesSchemaFullChecking, schemaFullChecking); parser->setFeature(XMLUni::fgSAX2CoreNameSpacePrefixes, namespacePrefixes); parser->setFeature(XMLUni::fgSAX2CoreNameSpacePrefixes, namespacePrefixes); int errorCount = 0; int nlink = 0; int nlink = 0; string current_uri = uri; string current_uri = uri; ... @@ -101,7 +99,7 @@ void SpeciesReader::uri_to_species(const string uri, Species& sp) ... @@ -101,7 +99,7 @@ void SpeciesReader::uri_to_species(const string uri, Species& sp) parser->setContentHandler(&handler); parser->setContentHandler(&handler); parser->setErrorHandler(&handler); parser->setErrorHandler(&handler); parser->parse(uri.c_str()); parser->parse(uri.c_str()); errorCount = parser->getErrorCount(); // errorCount = parser->getErrorCount(); delete sp_handler; delete sp_handler; } } ... @@ -198,8 +196,6 @@ void SpeciesReader::string_to_species(const string xmlstr, Species& sp) ... @@ -198,8 +196,6 @@ void SpeciesReader::string_to_species(const string xmlstr, Species& sp) parser->setFeature(XMLUni::fgXercesSchemaFullChecking, schemaFullChecking); parser->setFeature(XMLUni::fgXercesSchemaFullChecking, schemaFullChecking); parser->setFeature(XMLUni::fgSAX2CoreNameSpacePrefixes, namespacePrefixes); parser->setFeature(XMLUni::fgSAX2CoreNameSpacePrefixes, namespacePrefixes); int errorCount = 0; MemBufInputSource* memBufIS = 0; MemBufInputSource* memBufIS = 0; try try ... @@ -211,7 +207,7 @@ void SpeciesReader::string_to_species(const string xmlstr, Species& sp) ... @@ -211,7 +207,7 @@ void SpeciesReader::string_to_species(const string xmlstr, Species& sp) parser->setContentHandler(&handler); parser->setContentHandler(&handler); parser->setErrorHandler(&handler); parser->setErrorHandler(&handler); parser->parse(*memBufIS); parser->parse(*memBufIS); errorCount = parser->getErrorCount(); // errorCount = parser->getErrorCount(); delete sp_handler; delete sp_handler; } } ... ...
 ... @@ -97,13 +97,12 @@ vector > &rp) const ... @@ -97,13 +97,12 @@ vector > &rp) const D3vector r4p(pr4p); D3vector r4p(pr4p); const double h = 0.001; const double h = 0.001; const double fac = 0.5 / h; D3vector dx(h,0,0), dy(0,h,0), dz(0,0,h); D3vector dx(h,0,0), dy(0,h,0), dz(0,0,h); // compute gradient at r // compute gradient at r D3vector g1,g2,g3,g4; D3vector g1,g2,g3,g4; grad_sigma(r1,r2,r3,r4,g1,g2,g3,g4); grad_sigma(r1,r2,r3,r4,g1,g2,g3,g4); const double a = torsion_angle(r1,r2,r3,r4); // const double a = torsion_angle(r1,r2,r3,r4); double ng = g1*g1 + g2*g2 + g3*g3 + g4*g4; double ng = g1*g1 + g2*g2 + g3*g3 + g4*g4; assert(ng>=0.0); assert(ng>=0.0); ... @@ -299,7 +298,6 @@ void TorsionConstraint::compute_force(const vector > &r0, ... @@ -299,7 +298,6 @@ void TorsionConstraint::compute_force(const vector > &r0, D3vector f4(pf4); D3vector f4(pf4); const double h = 0.001; const double h = 0.001; const double fac = 0.5 / h; D3vector dx(h,0,0), dy(0,h,0), dz(0,0,h); D3vector dx(h,0,0), dy(0,h,0), dz(0,0,h); // compute gradient at r // compute gradient at r ... ...
 ... @@ -51,8 +51,8 @@ int jacobi(int maxsweep, double threshold, DoubleMatrix& a, DoubleMatrix& u, ... @@ -51,8 +51,8 @@ int jacobi(int maxsweep, double threshold, DoubleMatrix& a, DoubleMatrix& u, assert(a.nb()==u.nb()); assert(a.nb()==u.nb()); const int mloc = a.mloc(); const int mloc = a.mloc(); const int nloc = a.nloc(); // const int nloc = a.nloc(); //cout << ctxt.mype() << ": nloc: " << nloc << endl; // cout << ctxt.mype() << ": nloc: " << nloc << endl; // identify the last active process column // identify the last active process column // process columns beyond that column do not have any elements of a[k] // process columns beyond that column do not have any elements of a[k] ... ...
 ... @@ -164,7 +164,10 @@ int jade(int maxsweep, double tol, vector a, ... @@ -164,7 +164,10 @@ int jade(int maxsweep, double tol, vector a, // apq[3*ipair+2 + k*3*nploc] = aqq[k][ipair] // apq[3*ipair+2 + k*3*nploc] = aqq[k][ipair] vector apq(a.size()*3*nploc); vector apq(a.size()*3*nploc); double diag_sum = 0.0, previous_diag_sum = 0.0; double diag_sum = 0.0; #ifdef DEBUG double previous_diag_sum = 0.0; #endif while ( !done ) while ( !done ) { { // sweep: process local pairs and rotate 2*np-1 times // sweep: process local pairs and rotate 2*np-1 times ... @@ -485,7 +488,9 @@ int jade(int maxsweep, double tol, vector a, ... @@ -485,7 +488,9 @@ int jade(int maxsweep, double tol, vector a, { { // compute sum of squares of diagonal elements using current values // compute sum of squares of diagonal elements using current values // (after rotation) // (after rotation) #ifdef DEBUG previous_diag_sum = diag_sum; previous_diag_sum = diag_sum; #endif diag_sum = 0.0; diag_sum = 0.0; for ( int k = 0; k < a.size(); k++ ) for ( int k = 0; k < a.size(); k++ ) { { ... ...
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!