mirror of https://github.com/QMCPACK/qmcpack.git
Fix clang warnings in AFQMC.
git-svn-id: https://subversion.assembla.com/svn/qmcdev/trunk@7387 e5b18d87-469d-4833-9cc0-8cdfa06e9491
This commit is contained in:
parent
a84adc6e3f
commit
28ed9536d0
|
@ -106,6 +106,7 @@ class EstimatorHandler: public MPIObjectBase, public AFQMCInfo
|
|||
cur = cur->next;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Estimator does not use TGs right now
|
||||
|
@ -129,6 +130,7 @@ class EstimatorHandler: public MPIObjectBase, public AFQMCInfo
|
|||
for(std::vector<EstimatorBase*>::iterator it=estimators.begin(); it!=estimators.end(); it++)
|
||||
(*it)->setup(TGdata,v,ham0,wfn0,LocalTimer,heads_comm,tg_comm,node_comm,head_tgs);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void setTargetWeight(RealType w0) { estimators[0]->setTargetWeight(w0); }
|
||||
|
|
|
@ -56,11 +56,12 @@ namespace qmcplusplus
|
|||
sHam->initializeCCProjector(Pmat);
|
||||
for(int i=0; i<Pmat.rows(); i++) Pmat(i,i)=0.0;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CCProjector::initFromHDF5(const std::string& fileName)
|
||||
{
|
||||
|
||||
return false;
|
||||
/*
|
||||
hdf_archive dump(myComm);
|
||||
if(!dump.open(fileName,H5F_ACC_RDONLY,false)) {
|
||||
|
|
|
@ -60,9 +60,9 @@ class CCProjector: public ProjectorBase
|
|||
// P(i,j) == 0, P(i,j)==P(j,i)
|
||||
ComplexMatrix Pmat;
|
||||
|
||||
bool initFromASCII(const std::string& fileName) {};
|
||||
bool initFromASCII(const std::string& fileName) {return true;};
|
||||
|
||||
bool initFromXML(const std::string& fileName) {};
|
||||
bool initFromXML(const std::string& fileName) {return true;};
|
||||
|
||||
bool initFromHDF5(const std::string& fileName);
|
||||
|
||||
|
|
|
@ -39,12 +39,13 @@ namespace qmcplusplus
|
|||
// start by just setting to zero
|
||||
Pmat.resize(2*NMO,2*NMO);
|
||||
Pmat=0;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool DDProjector::initFromHDF5(const std::string& fileName)
|
||||
{
|
||||
|
||||
return false;
|
||||
/*
|
||||
hdf_archive dump(myComm);
|
||||
if(!dump.open(fileName,H5F_ACC_RDONLY,false)) {
|
||||
|
|
|
@ -56,9 +56,9 @@ class DDProjector: public ProjectorBase
|
|||
// P(i,j) == 0, P(i,j)==P(j,i)
|
||||
ValueMatrix Pmat;
|
||||
|
||||
bool initFromASCII(const std::string& fileName) {};
|
||||
bool initFromASCII(const std::string& fileName) {return true;};
|
||||
|
||||
bool initFromXML(const std::string& fileName) {};
|
||||
bool initFromXML(const std::string& fileName) {return true;};
|
||||
|
||||
bool initFromHDF5(const std::string& fileName);
|
||||
|
||||
|
|
|
@ -345,7 +345,7 @@ class SparseGeneralHamiltonian: public HamiltonianBase
|
|||
return false;
|
||||
}
|
||||
|
||||
bool initFromXML(const std::string& fileName) {}
|
||||
bool initFromXML(const std::string& fileName) {return true;}
|
||||
|
||||
bool initFromHDF5(const std::string& fileName);
|
||||
|
||||
|
@ -531,15 +531,13 @@ class SparseGeneralHamiltonian: public HamiltonianBase
|
|||
APP_ABORT(" Error in mapUT_woD: This should not happen. \n");
|
||||
} else if(j > i)
|
||||
return N*i + j - (i*(i+1))/2 - i-1;
|
||||
else
|
||||
return N*j + i - (j*(j+1))/2 - j-1;
|
||||
return N*j + i - (j*(j+1))/2 - j-1;
|
||||
}
|
||||
|
||||
inline int mapUT(int i, int j, int N) {
|
||||
if(j >= i)
|
||||
return N*i + j - (i*(i+1))/2;
|
||||
else
|
||||
return N*j + i - (j*(j+1))/2;
|
||||
return N*j + i - (j*(j+1))/2;
|
||||
}
|
||||
|
||||
inline int mapUT_woD(int i, int j, int N) {
|
||||
|
@ -547,8 +545,7 @@ class SparseGeneralHamiltonian: public HamiltonianBase
|
|||
APP_ABORT(" Error in mapUT_woD: This should not happen. \n");
|
||||
} else if(j > i)
|
||||
return N*i + j - (i*(i+1))/2 - i-1;
|
||||
else
|
||||
return N*j + i - (j*(j+1))/2 - j-1;
|
||||
return N*j + i - (j*(j+1))/2 - j-1;
|
||||
}
|
||||
|
||||
bool communicate_Vijkl(ComplexSMSpMat&);
|
||||
|
|
|
@ -313,6 +313,7 @@ bool phaseless_ImpSamp_ForceBias::hdf_write(hdf_archive& dump,const std::string&
|
|||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool phaseless_ImpSamp_ForceBias::hdf_read(hdf_archive& dump,const std::string& tag)
|
||||
|
|
|
@ -110,7 +110,7 @@ class GeneralSingleDeterminant: public WavefunctionBase
|
|||
|
||||
bool initFromAscii(std::string fileName);
|
||||
bool initFromHDF5(hdf_archive&,const std::string&);
|
||||
bool initFromXML(std::string fileName) {}
|
||||
bool initFromXML(std::string fileName) {return true;}
|
||||
|
||||
bool getHamiltonian(HamPtr );
|
||||
|
||||
|
|
|
@ -468,6 +468,7 @@ bool MultiPureSingleDeterminant::initFromAscii(std::string fileName)
|
|||
// calculate relations between determinants
|
||||
// setup necessary data structures for low-rank updates
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool MultiPureSingleDeterminant::getHamiltonian(HamPtr h)
|
||||
|
@ -635,10 +636,10 @@ bool MultiPureSingleDeterminant::getHamiltonian(HamPtr h)
|
|||
}
|
||||
|
||||
bool MultiPureSingleDeterminant::hdf_write(hdf_archive& read, const std::string& tag, bool include_tensors)
|
||||
{}
|
||||
{return true;}
|
||||
|
||||
bool MultiPureSingleDeterminant::hdf_write()
|
||||
{}
|
||||
{return true;}
|
||||
|
||||
void MultiPureSingleDeterminant::local_evaluateOneBodyMixedDensityMatrixFull(const ComplexType* SlaterMat, ComplexType& ovl, ComplexMatrix& dm, bool full)
|
||||
{
|
||||
|
|
|
@ -119,8 +119,8 @@ class MultiPureSingleDeterminant: public WavefunctionBase
|
|||
double IterCI_cut;
|
||||
|
||||
bool initFromAscii(std::string fileName);
|
||||
bool initFromHDF5(hdf_archive&,const std::string&) {}
|
||||
bool initFromXML(std::string fileName) {}
|
||||
bool initFromHDF5(hdf_archive&,const std::string&) {return true;}
|
||||
bool initFromXML(std::string fileName) {return true;}
|
||||
|
||||
|
||||
bool getHamiltonian(HamPtr );
|
||||
|
|
|
@ -108,7 +108,7 @@ class PureSingleDeterminant: public WavefunctionBase
|
|||
|
||||
bool initFromAscii(std::string fileName);
|
||||
bool initFromHDF5(hdf_archive&,const std::string&);
|
||||
bool initFromXML(std::string fileName) {}
|
||||
bool initFromXML(std::string fileName) {return true;}
|
||||
|
||||
bool getHamiltonian(HamPtr );
|
||||
|
||||
|
|
|
@ -95,6 +95,7 @@ class WavefunctionBase: public MPIObjectBase, public AFQMCInfo
|
|||
virtual int sizeOfInfoForDistributedPropagation()
|
||||
{
|
||||
APP_ABORT("WavefunctionBase::sizeOfInfoForDistributedPropagation() not implemented for this wavefunction type. \n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
virtual void calculateMeanFieldMatrixElementOfOneBodyOperators(bool addBetaBeta, ComplexSpMat&, std::vector<ComplexType>& v, const int n=-1 )=0;
|
||||
|
|
|
@ -306,6 +306,7 @@ class WavefunctionHandler: public MPIObjectBase, public AFQMCInfo
|
|||
} else {
|
||||
APP_ABORT("Unknown wavefunction type in isOccupAlpha. \n");
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool isOccupBeta( const std::string& type, int i) {
|
||||
|
@ -320,6 +321,7 @@ class WavefunctionHandler: public MPIObjectBase, public AFQMCInfo
|
|||
} else {
|
||||
APP_ABORT("Unknown wavefunction type in isOccupBeta. \n");
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool check_initialized(const std::string& type)
|
||||
|
|
Loading…
Reference in New Issue