TBTK
TBTK::LindhardSusceptibilityCalculator Class Reference
Inheritance diagram for TBTK::LindhardSusceptibilityCalculator:
TBTK::SusceptibilityCalculator

Public Member Functions

 LindhardSusceptibilityCalculator (const MomentumSpaceContext &momentumSpaceContext)
 
virtual ~LindhardSusceptibilityCalculator ()
 
virtual LindhardSusceptibilityCalculatorcreateSlave ()
 
virtual std::complex< double > calculateSusceptibility (const std::vector< double > &k, const std::vector< int > &orbitalIndices, std::complex< double > energy)
 
virtual std::vector< std::complex< double > > calculateSusceptibility (const DualIndex &kDual, const std::vector< int > &orbitalIndices)
 
void precompute (unsigned int numWorkers=129)
 
void setSusceptibilityIsSafeFromPoles (bool susceptibilityIsSafeFromPoles)
 
bool getSusceptibilityIsSafeFromPoles () const
 
- Public Member Functions inherited from TBTK::SusceptibilityCalculator
 SusceptibilityCalculator (Algorithm algorithm, const MomentumSpaceContext &momentumSpaceContext)
 
virtual ~SusceptibilityCalculator ()
 
std::vector< std::complex< double > > calculateSusceptibility (const std::vector< double > &k, const std::vector< int > &orbitalIndices)
 
const MomentumSpaceContextgetMomentumSpaceContext () const
 
void generateKPlusQLookupTable ()
 
Algorithm getAlgorithm () const
 
void setEnergyType (EnergyType energyType)
 
EnergyType getEnergyType () const
 
void setEnergies (const std::vector< std::complex< double >> &energies)
 
const std::vector< std::complex< double > > & getEnergies () const
 
void setEnergiesAreInversionSymmetric (bool energiesAreInversionSymmetric)
 
bool getEnergiesAreInversionSymmetric () const
 
void saveSusceptibilities (const std::string &filename) const
 
void loadSusceptibilities (const std::string &filename)
 

Additional Inherited Members

- Public Types inherited from TBTK::SusceptibilityCalculator
enum  Algorithm { Lindhard = 0, Matsubara = 1 }
 
enum  EnergyType { Real, Imaginary, Complex }
 
- Protected Member Functions inherited from TBTK::SusceptibilityCalculator
 SusceptibilityCalculator (Algorithm algorithm, const MomentumSpaceContext &momentumSpaceContext, int *kPlusQLookupTable)
 
bool getIsMaster () const
 
int * getKPlusQLookupTable ()
 
const int * getKPlusQLookupTable () const
 
Index getSusceptibilityResultIndex (const Index &kIndex, const std::vector< int > &orbitalIndices) const
 
const IndexedDataTree< SerializableVector< std::complex< double > > > & getSusceptibilityTree () const
 
template<bool useKPlusQLookupTable>
int getKPlusQLinearIndex (unsigned int meshIndex, const std::vector< double > &k, int kLinearIndex) const
 
void cacheSusceptibility (const std::vector< std::complex< double >> &result, const std::vector< double > &k, const std::vector< int > &orbitalIndices, const Index &kIndex, const Index &resultIndex)
 
void clearCache ()
 
template<>
int getKPlusQLinearIndex (unsigned int meshIndex, const std::vector< double > &k, int kLinearIndex) const
 
template<>
int getKPlusQLinearIndex (unsigned int meshIndex, const std::vector< double > &k, int kLinearIndex) const
 

Constructor & Destructor Documentation

TBTK::LindhardSusceptibilityCalculator::LindhardSusceptibilityCalculator ( const MomentumSpaceContext momentumSpaceContext)

Constructor.

virtual TBTK::LindhardSusceptibilityCalculator::~LindhardSusceptibilityCalculator ( )
virtual

Destructor.

Member Function Documentation

virtual std::complex<double> TBTK::LindhardSusceptibilityCalculator::calculateSusceptibility ( const std::vector< double > &  k,
const std::vector< int > &  orbitalIndices,
std::complex< double >  energy 
)
virtual

Calculate the susceptibility.

Implements TBTK::SusceptibilityCalculator.

virtual std::vector<std::complex<double> > TBTK::LindhardSusceptibilityCalculator::calculateSusceptibility ( const DualIndex kDual,
const std::vector< int > &  orbitalIndices 
)
virtual

Calculate the susceptibility.

Implements TBTK::SusceptibilityCalculator.

virtual LindhardSusceptibilityCalculator* TBTK::LindhardSusceptibilityCalculator::createSlave ( )
virtual

Create slave SusceptibilityCalcuator. The slave reuses internal lookup tables used to speed up the calculations and should not be used after the generating master have been destructed.

Implements TBTK::SusceptibilityCalculator.

bool TBTK::LindhardSusceptibilityCalculator::getSusceptibilityIsSafeFromPoles ( ) const
inline

Get whether the susceptibility is known to only be evaluated at points away from poles.

void TBTK::LindhardSusceptibilityCalculator::precompute ( unsigned int  numWorkers = 129)

Precompute susceptibilities. Will calculate the susceptibility for all values using a parallel algorithm. Can speed up calculations if most of the susceptibilities are needed.

void TBTK::LindhardSusceptibilityCalculator::setSusceptibilityIsSafeFromPoles ( bool  susceptibilityIsSafeFromPoles)
inline

Set to true if the susceptibility is known to only be evaluated at points away from poles.


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