DFT-EFE
 
Loading...
Searching...
No Matches
dftefe::ksdft::KohnShamEigenSolver< ValueTypeOperator, ValueTypeOperand, memorySpace > Class Template Reference

#include <KohnShamEigenSolver.h>

Inheritance diagram for dftefe::ksdft::KohnShamEigenSolver< ValueTypeOperator, ValueTypeOperand, memorySpace >:
Collaboration diagram for dftefe::ksdft::KohnShamEigenSolver< ValueTypeOperator, ValueTypeOperand, memorySpace >:

Public Types

using ValueType = typename linearAlgebra::HermitianIterativeEigenSolver< ValueTypeOperator, ValueTypeOperand, memorySpace >::ValueType
 define ValueType as the superior (bigger set) of the ValueTypeOperator and ValueTypeOperand (e.g., between double and complex<double>, complex<double> is the bigger set) More...
 
using RealType = typename linearAlgebra::HermitianIterativeEigenSolver< ValueTypeOperator, ValueTypeOperand, memorySpace >::RealType
 
using OpContext = typename linearAlgebra::HermitianIterativeEigenSolver< ValueTypeOperator, ValueTypeOperand, memorySpace >::OpContext
 

Public Member Functions

 KohnShamEigenSolver (const size_type numElectrons, const double smearingTemperature, const double fermiEnergyTolerance, const double fracOccupancyTolerance, const double eigenSolveResidualTolerance, const size_type maxChebyshevFilterPass, linearAlgebra::MultiVector< ValueTypeOperand, memorySpace > &waveFunctionSubspaceGuess, linearAlgebra::Vector< ValueTypeOperand, memorySpace > &lanczosGuess, const size_type waveFunctionBlockSize=0, const OpContext &MLanczos=linearAlgebra::IdentityOperatorContext< ValueTypeOperator, ValueTypeOperand, memorySpace >(), const OpContext &MInvLanczos=linearAlgebra::IdentityOperatorContext< ValueTypeOperator, ValueTypeOperand, memorySpace >())
 Constructor The occupation Tolerance is such that one considers the Kohn Sham Orbitals occupied if occupationTolerance < f_i(from diftribution) < 1-1e-12. More...
 
 ~KohnShamEigenSolver ()=default
 Default Destructor. More...
 
void reinitBasis (linearAlgebra::MultiVector< ValueTypeOperand, memorySpace > &waveFunctionSubspaceGuess, linearAlgebra::Vector< ValueTypeOperand, memorySpace > &lanczosGuess, const OpContext &MLanczos=linearAlgebra::IdentityOperatorContext< ValueTypeOperator, ValueTypeOperand, memorySpace >(), const OpContext &MInvLanczos=linearAlgebra::IdentityOperatorContext< ValueTypeOperator, ValueTypeOperand, memorySpace >())
 
void reinitBounds (double wantedSpectrumLowerBound, double wantedSpectrumUpperBound)
 
RealType getFermiEnergy ()
 
std::vector< RealTypegetFractionalOccupancy ()
 
std::vector< RealTypegetEigenSolveResidualNorm ()
 
linearAlgebra::EigenSolverError solve (const OpContext &kohnShamOperator, std::vector< RealType > &kohnShamEnergies, linearAlgebra::MultiVector< ValueType, memorySpace > &kohnShamWaveFunctions, bool computeWaveFunctions=false, const OpContext &M=linearAlgebra::IdentityOperatorContext< ValueTypeOperator, ValueTypeOperand, memorySpace >(), const OpContext &MInv=linearAlgebra::IdentityOperatorContext< ValueTypeOperator, ValueTypeOperand, memorySpace >()) override
 
linearAlgebra::MultiVector< ValueType, memorySpace > & getFilteredSubspace ()
 
linearAlgebra::MultiVector< ValueType, memorySpace > & getOrthogonalizedFilteredSubspace ()
 

Private Attributes

double d_smearingTemperature
 
double d_fermiEnergyTolerance
 
double d_fracOccupancyTolerance
 
double d_eigenSolveResidualTolerance
 
size_type d_maxChebyshevFilterPass
 
size_type d_chebyshevPolynomialDegree
 
size_type d_numWantedEigenvalues
 
size_type d_waveFunctionBlockSize
 
linearAlgebra::MultiVector< ValueTypeOperand, memorySpace > * d_waveFunctionSubspaceGuess
 
linearAlgebra::Vector< ValueTypeOperand, memorySpace > * d_lanczosGuess
 
const OpContextd_MLanczos
 
const OpContextd_MInvLanczos
 
std::vector< RealTyped_fracOccupancy
 
std::vector< RealTyped_eigSolveResNorm
 
RealType d_fermiEnergy
 
bool d_isSolved
 
const size_type d_numElectrons
 
utils::ConditionalOStream d_rootCout
 
double d_wantedSpectrumLowerBound
 
double d_wantedSpectrumUpperBound
 
bool d_isBoundKnown
 
linearAlgebra::MultiVector< ValueType, memorySpace > * d_filteredSubspaceOrtho
 
linearAlgebra::MultiVector< ValueType, memorySpace > * d_filteredSubspace
 

Detailed Description

template<typename ValueTypeOperator, typename ValueTypeOperand, utils::MemorySpace memorySpace>
class dftefe::ksdft::KohnShamEigenSolver< ValueTypeOperator, ValueTypeOperand, memorySpace >
Template Parameters
ValueTypeOperatorThe datatype (float, double, complex<double>, etc.) for the underlying operator
ValueTypeOperandThe datatype (float, double, complex<double>, etc.) of the vector, matrices, etc. on which the operator will act
memorySpaceThe meory sapce (HOST, DEVICE, HOST_PINNED, etc.) in which the data of the operator and its operands reside

Member Typedef Documentation

◆ OpContext

template<typename ValueTypeOperator , typename ValueTypeOperand , utils::MemorySpace memorySpace>
using dftefe::ksdft::KohnShamEigenSolver< ValueTypeOperator, ValueTypeOperand, memorySpace >::OpContext = typename linearAlgebra::HermitianIterativeEigenSolver< ValueTypeOperator, ValueTypeOperand, memorySpace>::OpContext

◆ RealType

template<typename ValueTypeOperator , typename ValueTypeOperand , utils::MemorySpace memorySpace>
using dftefe::ksdft::KohnShamEigenSolver< ValueTypeOperator, ValueTypeOperand, memorySpace >::RealType = typename linearAlgebra::HermitianIterativeEigenSolver< ValueTypeOperator, ValueTypeOperand, memorySpace>::RealType

◆ ValueType

template<typename ValueTypeOperator , typename ValueTypeOperand , utils::MemorySpace memorySpace>
using dftefe::ksdft::KohnShamEigenSolver< ValueTypeOperator, ValueTypeOperand, memorySpace >::ValueType = typename linearAlgebra::HermitianIterativeEigenSolver< ValueTypeOperator, ValueTypeOperand, memorySpace>::ValueType

define ValueType as the superior (bigger set) of the ValueTypeOperator and ValueTypeOperand (e.g., between double and complex<double>, complex<double> is the bigger set)

Constructor & Destructor Documentation

◆ KohnShamEigenSolver()

template<typename ValueTypeOperator , typename ValueTypeOperand , utils::MemorySpace memorySpace>
dftefe::ksdft::KohnShamEigenSolver< ValueTypeOperator, ValueTypeOperand, memorySpace >::KohnShamEigenSolver ( const size_type  numElectrons,
const double  smearingTemperature,
const double  fermiEnergyTolerance,
const double  fracOccupancyTolerance,
const double  eigenSolveResidualTolerance,
const size_type  maxChebyshevFilterPass,
linearAlgebra::MultiVector< ValueTypeOperand, memorySpace > &  waveFunctionSubspaceGuess,
linearAlgebra::Vector< ValueTypeOperand, memorySpace > &  lanczosGuess,
const size_type  waveFunctionBlockSize = 0,
const OpContext MLanczos = linearAlgebra::IdentityOperatorContext<ValueTypeOperator, ValueTypeOperand, memorySpace>(),
const OpContext MInvLanczos = linearAlgebra::IdentityOperatorContext<ValueTypeOperator, ValueTypeOperand, memorySpace>() 
)

Constructor The occupation Tolerance is such that one considers the Kohn Sham Orbitals occupied if occupationTolerance < f_i(from diftribution) < 1-1e-12.

Here is the call graph for this function:

◆ ~KohnShamEigenSolver()

template<typename ValueTypeOperator , typename ValueTypeOperand , utils::MemorySpace memorySpace>
dftefe::ksdft::KohnShamEigenSolver< ValueTypeOperator, ValueTypeOperand, memorySpace >::~KohnShamEigenSolver ( )
default

Default Destructor.

Member Function Documentation

◆ getEigenSolveResidualNorm()

template<typename ValueTypeOperator , typename ValueTypeOperand , utils::MemorySpace memorySpace>
std::vector< typename linearAlgebra::HermitianIterativeEigenSolver< ValueTypeOperator, ValueTypeOperand, memorySpace >::RealType > dftefe::ksdft::KohnShamEigenSolver< ValueTypeOperator, ValueTypeOperand, memorySpace >::getEigenSolveResidualNorm
Here is the call graph for this function:

◆ getFermiEnergy()

template<typename ValueTypeOperator , typename ValueTypeOperand , utils::MemorySpace memorySpace>
linearAlgebra::HermitianIterativeEigenSolver< ValueTypeOperator, ValueTypeOperand, memorySpace >::RealType dftefe::ksdft::KohnShamEigenSolver< ValueTypeOperator, ValueTypeOperand, memorySpace >::getFermiEnergy
Here is the call graph for this function:

◆ getFilteredSubspace()

template<typename ValueTypeOperator , typename ValueTypeOperand , utils::MemorySpace memorySpace>
linearAlgebra::MultiVector< typename linearAlgebra::HermitianIterativeEigenSolver< ValueTypeOperator, ValueTypeOperand, memorySpace >::ValueType, memorySpace > & dftefe::ksdft::KohnShamEigenSolver< ValueTypeOperator, ValueTypeOperand, memorySpace >::getFilteredSubspace
Here is the call graph for this function:

◆ getFractionalOccupancy()

template<typename ValueTypeOperator , typename ValueTypeOperand , utils::MemorySpace memorySpace>
std::vector< typename linearAlgebra::HermitianIterativeEigenSolver< ValueTypeOperator, ValueTypeOperand, memorySpace >::RealType > dftefe::ksdft::KohnShamEigenSolver< ValueTypeOperator, ValueTypeOperand, memorySpace >::getFractionalOccupancy
Here is the call graph for this function:

◆ getOrthogonalizedFilteredSubspace()

template<typename ValueTypeOperator , typename ValueTypeOperand , utils::MemorySpace memorySpace>
linearAlgebra::MultiVector< typename linearAlgebra::HermitianIterativeEigenSolver< ValueTypeOperator, ValueTypeOperand, memorySpace >::ValueType, memorySpace > & dftefe::ksdft::KohnShamEigenSolver< ValueTypeOperator, ValueTypeOperand, memorySpace >::getOrthogonalizedFilteredSubspace
Here is the call graph for this function:

◆ reinitBasis()

template<typename ValueTypeOperator , typename ValueTypeOperand , utils::MemorySpace memorySpace>
void dftefe::ksdft::KohnShamEigenSolver< ValueTypeOperator, ValueTypeOperand, memorySpace >::reinitBasis ( linearAlgebra::MultiVector< ValueTypeOperand, memorySpace > &  waveFunctionSubspaceGuess,
linearAlgebra::Vector< ValueTypeOperand, memorySpace > &  lanczosGuess,
const OpContext MLanczos = linearAlgebra::IdentityOperatorContext<ValueTypeOperator, ValueTypeOperand, memorySpace>(),
const OpContext MInvLanczos = linearAlgebra::IdentityOperatorContext<ValueTypeOperator, ValueTypeOperand, memorySpace>() 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ reinitBounds()

template<typename ValueTypeOperator , typename ValueTypeOperand , utils::MemorySpace memorySpace>
void dftefe::ksdft::KohnShamEigenSolver< ValueTypeOperator, ValueTypeOperand, memorySpace >::reinitBounds ( double  wantedSpectrumLowerBound,
double  wantedSpectrumUpperBound 
)

◆ solve()

template<typename ValueTypeOperator , typename ValueTypeOperand , utils::MemorySpace memorySpace>
linearAlgebra::EigenSolverError dftefe::ksdft::KohnShamEigenSolver< ValueTypeOperator, ValueTypeOperand, memorySpace >::solve ( const OpContext kohnShamOperator,
std::vector< RealType > &  kohnShamEnergies,
linearAlgebra::MultiVector< ValueType, memorySpace > &  kohnShamWaveFunctions,
bool  computeWaveFunctions = false,
const OpContext M = linearAlgebra::IdentityOperatorContext<ValueTypeOperator, ValueTypeOperand, memorySpace>(),
const OpContext MInv = linearAlgebra::IdentityOperatorContext<ValueTypeOperator, ValueTypeOperand, memorySpace>() 
)
override
Here is the call graph for this function:

Member Data Documentation

◆ d_chebyshevPolynomialDegree

template<typename ValueTypeOperator , typename ValueTypeOperand , utils::MemorySpace memorySpace>
size_type dftefe::ksdft::KohnShamEigenSolver< ValueTypeOperator, ValueTypeOperand, memorySpace >::d_chebyshevPolynomialDegree
private

◆ d_eigenSolveResidualTolerance

template<typename ValueTypeOperator , typename ValueTypeOperand , utils::MemorySpace memorySpace>
double dftefe::ksdft::KohnShamEigenSolver< ValueTypeOperator, ValueTypeOperand, memorySpace >::d_eigenSolveResidualTolerance
private

◆ d_eigSolveResNorm

template<typename ValueTypeOperator , typename ValueTypeOperand , utils::MemorySpace memorySpace>
std::vector<RealType> dftefe::ksdft::KohnShamEigenSolver< ValueTypeOperator, ValueTypeOperand, memorySpace >::d_eigSolveResNorm
private

◆ d_fermiEnergy

template<typename ValueTypeOperator , typename ValueTypeOperand , utils::MemorySpace memorySpace>
RealType dftefe::ksdft::KohnShamEigenSolver< ValueTypeOperator, ValueTypeOperand, memorySpace >::d_fermiEnergy
private

◆ d_fermiEnergyTolerance

template<typename ValueTypeOperator , typename ValueTypeOperand , utils::MemorySpace memorySpace>
double dftefe::ksdft::KohnShamEigenSolver< ValueTypeOperator, ValueTypeOperand, memorySpace >::d_fermiEnergyTolerance
private

◆ d_filteredSubspace

template<typename ValueTypeOperator , typename ValueTypeOperand , utils::MemorySpace memorySpace>
linearAlgebra::MultiVector<ValueType, memorySpace>* dftefe::ksdft::KohnShamEigenSolver< ValueTypeOperator, ValueTypeOperand, memorySpace >::d_filteredSubspace
private

◆ d_filteredSubspaceOrtho

template<typename ValueTypeOperator , typename ValueTypeOperand , utils::MemorySpace memorySpace>
linearAlgebra::MultiVector<ValueType, memorySpace>* dftefe::ksdft::KohnShamEigenSolver< ValueTypeOperator, ValueTypeOperand, memorySpace >::d_filteredSubspaceOrtho
private

◆ d_fracOccupancy

template<typename ValueTypeOperator , typename ValueTypeOperand , utils::MemorySpace memorySpace>
std::vector<RealType> dftefe::ksdft::KohnShamEigenSolver< ValueTypeOperator, ValueTypeOperand, memorySpace >::d_fracOccupancy
private

◆ d_fracOccupancyTolerance

template<typename ValueTypeOperator , typename ValueTypeOperand , utils::MemorySpace memorySpace>
double dftefe::ksdft::KohnShamEigenSolver< ValueTypeOperator, ValueTypeOperand, memorySpace >::d_fracOccupancyTolerance
private

◆ d_isBoundKnown

template<typename ValueTypeOperator , typename ValueTypeOperand , utils::MemorySpace memorySpace>
bool dftefe::ksdft::KohnShamEigenSolver< ValueTypeOperator, ValueTypeOperand, memorySpace >::d_isBoundKnown
private

◆ d_isSolved

template<typename ValueTypeOperator , typename ValueTypeOperand , utils::MemorySpace memorySpace>
bool dftefe::ksdft::KohnShamEigenSolver< ValueTypeOperator, ValueTypeOperand, memorySpace >::d_isSolved
private

◆ d_lanczosGuess

template<typename ValueTypeOperator , typename ValueTypeOperand , utils::MemorySpace memorySpace>
linearAlgebra::Vector<ValueTypeOperand, memorySpace>* dftefe::ksdft::KohnShamEigenSolver< ValueTypeOperator, ValueTypeOperand, memorySpace >::d_lanczosGuess
private

◆ d_maxChebyshevFilterPass

template<typename ValueTypeOperator , typename ValueTypeOperand , utils::MemorySpace memorySpace>
size_type dftefe::ksdft::KohnShamEigenSolver< ValueTypeOperator, ValueTypeOperand, memorySpace >::d_maxChebyshevFilterPass
private

◆ d_MInvLanczos

template<typename ValueTypeOperator , typename ValueTypeOperand , utils::MemorySpace memorySpace>
const OpContext* dftefe::ksdft::KohnShamEigenSolver< ValueTypeOperator, ValueTypeOperand, memorySpace >::d_MInvLanczos
private

◆ d_MLanczos

template<typename ValueTypeOperator , typename ValueTypeOperand , utils::MemorySpace memorySpace>
const OpContext* dftefe::ksdft::KohnShamEigenSolver< ValueTypeOperator, ValueTypeOperand, memorySpace >::d_MLanczos
private

◆ d_numElectrons

template<typename ValueTypeOperator , typename ValueTypeOperand , utils::MemorySpace memorySpace>
const size_type dftefe::ksdft::KohnShamEigenSolver< ValueTypeOperator, ValueTypeOperand, memorySpace >::d_numElectrons
private

◆ d_numWantedEigenvalues

template<typename ValueTypeOperator , typename ValueTypeOperand , utils::MemorySpace memorySpace>
size_type dftefe::ksdft::KohnShamEigenSolver< ValueTypeOperator, ValueTypeOperand, memorySpace >::d_numWantedEigenvalues
private

◆ d_rootCout

template<typename ValueTypeOperator , typename ValueTypeOperand , utils::MemorySpace memorySpace>
utils::ConditionalOStream dftefe::ksdft::KohnShamEigenSolver< ValueTypeOperator, ValueTypeOperand, memorySpace >::d_rootCout
private

◆ d_smearingTemperature

template<typename ValueTypeOperator , typename ValueTypeOperand , utils::MemorySpace memorySpace>
double dftefe::ksdft::KohnShamEigenSolver< ValueTypeOperator, ValueTypeOperand, memorySpace >::d_smearingTemperature
private

◆ d_wantedSpectrumLowerBound

template<typename ValueTypeOperator , typename ValueTypeOperand , utils::MemorySpace memorySpace>
double dftefe::ksdft::KohnShamEigenSolver< ValueTypeOperator, ValueTypeOperand, memorySpace >::d_wantedSpectrumLowerBound
private

◆ d_wantedSpectrumUpperBound

template<typename ValueTypeOperator , typename ValueTypeOperand , utils::MemorySpace memorySpace>
double dftefe::ksdft::KohnShamEigenSolver< ValueTypeOperator, ValueTypeOperand, memorySpace >::d_wantedSpectrumUpperBound
private

◆ d_waveFunctionBlockSize

template<typename ValueTypeOperator , typename ValueTypeOperand , utils::MemorySpace memorySpace>
size_type dftefe::ksdft::KohnShamEigenSolver< ValueTypeOperator, ValueTypeOperand, memorySpace >::d_waveFunctionBlockSize
private

◆ d_waveFunctionSubspaceGuess

template<typename ValueTypeOperator , typename ValueTypeOperand , utils::MemorySpace memorySpace>
linearAlgebra::MultiVector<ValueTypeOperand, memorySpace>* dftefe::ksdft::KohnShamEigenSolver< ValueTypeOperator, ValueTypeOperand, memorySpace >::d_waveFunctionSubspaceGuess
private

The documentation for this class was generated from the following files: