Skip to content

Commit

Permalink
Full mass matrix approach now only performed after scf is converged. …
Browse files Browse the repository at this point in the history
…Related cleanups. Tested on Cu 3shell
  • Loading branch information
dsambit committed Sep 6, 2019
1 parent b3405ba commit c1d93be
Show file tree
Hide file tree
Showing 9 changed files with 280 additions and 1,047 deletions.
3 changes: 2 additions & 1 deletion include/chebyshevOrthogonalizedSubspaceIterationSolver.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ namespace dftfe{
std::vector<double> & residuals,
const MPI_Comm &interBandGroupComm,
const bool useMixedPrec,
const bool isFirstScf=false);
const bool isFirstScf=false,
const bool useFullMassMatrixGEP=false);

/**
* @brief Solve a generalized eigen problem.
Expand Down
7 changes: 4 additions & 3 deletions include/dft.h
Original file line number Diff line number Diff line change
Expand Up @@ -868,9 +868,10 @@ namespace dftfe {
kohnShamDFTOperatorClass<FEOrder> & kohnShamDFTEigenOperator,
chebyshevOrthogonalizedSubspaceIterationSolver & subspaceIterationSolver,
std::vector<double> & residualNormWaveFunctions,
const bool isSpectrumSplit,
const bool useMixedPrec,
const bool isFirstScf);
const bool isSpectrumSplit=false,
const bool useMixedPrec=false,
const bool isFirstScf=false,
const bool useFullMassMatrixGEP=false);

void kohnShamEigenSpaceComputeNSCF(const unsigned int spinType,
const unsigned int kPointIndex,
Expand Down
1 change: 0 additions & 1 deletion include/dftParameters.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ namespace dftfe {

extern std::string startingWFCType;
extern unsigned int numCoreWfcRR;
extern unsigned int numCoreWfcMixedPrec;
extern bool useBatchGEMM;
extern unsigned int wfcBlockSize;
extern unsigned int chebyWfcBlockSize;
Expand Down
33 changes: 0 additions & 33 deletions include/linearAlgebraOperations.h
Original file line number Diff line number Diff line change
Expand Up @@ -290,30 +290,6 @@ namespace dftfe
const bool useMixedPrec,
std::vector<double> & eigenValues);

/** @brief Solve GHEP in full mass matrix and spectrum split route. Direct diagonalization is used
* (serial version using LAPACK, parallel version using ScaLAPACK)
*
* @param[in] operatorMatrix An object which has access to the given matrix
* @param[in] X Given subspace as flattened array of multi-vectors.
* @param[out] Y rotated subspace of top states
* @param[in] numberComponents Number of vectors
* @param[in] numberCoreStates Number of core states to be used for spectrum splitting
* @param[in] interBandGroupComm interpool communicator for parallelization over band groups
* @param[in] mpiComm domain decomposition communicator
* @param[in] boolean flag for use of mixed precision (overrides parameter file settings if set to false)
* @param[out] eigenValues of the Projected Hamiltonian
*/
template<typename T>
void rayleighRitzGEPFullMassMatrixSpectrumSplitDirect
(operatorDFTClass & operatorMatrix,
std::vector<T> & X,
std::vector<T> & Y,
const unsigned int numberComponents,
const unsigned int numberCoreStates,
const MPI_Comm &interBandGroupComm,
const MPI_Comm &mpiComm,
const bool useMixedPrec,
std::vector<double> & eigenValues);

/** @brief Compute Rayleigh-Ritz projection in case of spectrum split using direct diagonalization
* (serial version using LAPACK, parallel version using ScaLAPACK)
Expand Down Expand Up @@ -356,15 +332,6 @@ namespace dftfe
const MPI_Comm &interBandGroupComm,
std::vector<double> & residualNorm);


template<typename T>
void computeGEPResidualNorm(operatorDFTClass & operatorMatrix,
std::vector<T> & X,
const std::vector<double> & eigenValues,
const MPI_Comm &mpiComm,
const MPI_Comm &interBandGroupComm,
std::vector<double> & residualNorm);

}

}
Expand Down
Loading

0 comments on commit c1d93be

Please sign in to comment.