diff --git a/src/AFQMC/Estimators/EstimatorHandler.h b/src/AFQMC/Estimators/EstimatorHandler.h index 775e08efc..526390953 100755 --- a/src/AFQMC/Estimators/EstimatorHandler.h +++ b/src/AFQMC/Estimators/EstimatorHandler.h @@ -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::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); } diff --git a/src/AFQMC/Hamiltonians/CCProjector.cpp b/src/AFQMC/Hamiltonians/CCProjector.cpp index 2f5d15951..f78ea7cc1 100755 --- a/src/AFQMC/Hamiltonians/CCProjector.cpp +++ b/src/AFQMC/Hamiltonians/CCProjector.cpp @@ -56,11 +56,12 @@ namespace qmcplusplus sHam->initializeCCProjector(Pmat); for(int i=0; i 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&); diff --git a/src/AFQMC/Propagators/phaseless_ImpSamp_ForceBias.cpp b/src/AFQMC/Propagators/phaseless_ImpSamp_ForceBias.cpp index 4c89f6f26..ec51bb433 100755 --- a/src/AFQMC/Propagators/phaseless_ImpSamp_ForceBias.cpp +++ b/src/AFQMC/Propagators/phaseless_ImpSamp_ForceBias.cpp @@ -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) diff --git a/src/AFQMC/Wavefunctions/GeneralSingleDeterminant.h b/src/AFQMC/Wavefunctions/GeneralSingleDeterminant.h index 8d265513e..17027347a 100755 --- a/src/AFQMC/Wavefunctions/GeneralSingleDeterminant.h +++ b/src/AFQMC/Wavefunctions/GeneralSingleDeterminant.h @@ -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 ); diff --git a/src/AFQMC/Wavefunctions/MultiPureSingleDeterminant.cpp b/src/AFQMC/Wavefunctions/MultiPureSingleDeterminant.cpp index 98004c256..43be07e71 100755 --- a/src/AFQMC/Wavefunctions/MultiPureSingleDeterminant.cpp +++ b/src/AFQMC/Wavefunctions/MultiPureSingleDeterminant.cpp @@ -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) { diff --git a/src/AFQMC/Wavefunctions/MultiPureSingleDeterminant.h b/src/AFQMC/Wavefunctions/MultiPureSingleDeterminant.h index bb3ba9dd3..19f7f344c 100755 --- a/src/AFQMC/Wavefunctions/MultiPureSingleDeterminant.h +++ b/src/AFQMC/Wavefunctions/MultiPureSingleDeterminant.h @@ -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 ); diff --git a/src/AFQMC/Wavefunctions/PureSingleDeterminant.h b/src/AFQMC/Wavefunctions/PureSingleDeterminant.h index b355cf1e0..05d0677aa 100755 --- a/src/AFQMC/Wavefunctions/PureSingleDeterminant.h +++ b/src/AFQMC/Wavefunctions/PureSingleDeterminant.h @@ -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 ); diff --git a/src/AFQMC/Wavefunctions/WavefunctionBase.h b/src/AFQMC/Wavefunctions/WavefunctionBase.h index 56329c99f..73bb4b4a4 100755 --- a/src/AFQMC/Wavefunctions/WavefunctionBase.h +++ b/src/AFQMC/Wavefunctions/WavefunctionBase.h @@ -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& v, const int n=-1 )=0; diff --git a/src/AFQMC/Wavefunctions/WavefunctionHandler.h b/src/AFQMC/Wavefunctions/WavefunctionHandler.h index 1096345e2..7e33480ed 100755 --- a/src/AFQMC/Wavefunctions/WavefunctionHandler.h +++ b/src/AFQMC/Wavefunctions/WavefunctionHandler.h @@ -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)