TBTK
TBTK::Solver::Susceptibility Class Referenceabstract
Inheritance diagram for TBTK::Solver::Susceptibility:
TBTK::Solver::Solver TBTK::Solver::LindhardSusceptibility TBTK::Solver::MatsubaraSusceptibility TBTK::Solver::RPASusceptibility

Public Types

enum  Algorithm { Lindhard = 0, Matsubara = 1, RPA = 2 }
 

Public Member Functions

 Susceptibility (Algorithm algorithm, const MomentumSpaceContext &momentumSpaceContext)
 
virtual ~Susceptibility ()
 
virtual SusceptibilitycreateSlave ()=0
 
virtual std::vector< std::complex< double > > calculateSusceptibility (const Index &index, const std::vector< std::complex< double >> &energies)=0
 
const MomentumSpaceContextgetMomentumSpaceContext () const
 
void generateKPlusQLookupTable ()
 
Algorithm getAlgorithm () const
 
void setEnergiesAreInversionSymmetric (bool energiesAreInversionSymmetric)
 
bool getEnergiesAreInversionSymmetric () const
 
- Public Member Functions inherited from TBTK::Solver::Solver
 Solver ()
 
virtual ~Solver ()
 
virtual void setModel (Model &model)
 
ModelgetModel ()
 
const ModelgetModel () const
 

Protected Member Functions

 Susceptibility (Algorithm algorithm, const MomentumSpaceContext &momentumSpaceContext, int *kPlusQLookupTable)
 
bool getIsMaster () const
 
int * getKPlusQLookupTable ()
 
const int * getKPlusQLookupTable () const
 
template<bool useKPlusQLookupTable>
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
 
template<>
int getKPlusQLinearIndex (unsigned int meshIndex, const std::vector< double > &k, int kLinearIndex) const
 

Member Enumeration Documentation

List of algorithm identifiers. Officilly supported algorithms are given unique identifiers. Algorithms not (yet) supported should make sure they use an identifier that does not clash with the officially supported ones. [ideally a large random looking number (magic number) to also minimize accidental clashes with other algorithms that are not (yet) supported.

Constructor & Destructor Documentation

TBTK::Solver::Susceptibility::Susceptibility ( Algorithm  algorithm,
const MomentumSpaceContext momentumSpaceContext 
)

Constructor.

virtual TBTK::Solver::Susceptibility::~Susceptibility ( )
virtual

Destructor.

TBTK::Solver::Susceptibility::Susceptibility ( Algorithm  algorithm,
const MomentumSpaceContext momentumSpaceContext,
int *  kPlusQLookupTable 
)
protected

Slave constructor.

Member Function Documentation

virtual std::vector<std::complex<double> > TBTK::Solver::Susceptibility::calculateSusceptibility ( const Index index,
const std::vector< std::complex< double >> &  energies 
)
pure virtual
virtual Susceptibility* TBTK::Solver::Susceptibility::createSlave ( )
pure 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.

Implemented in TBTK::Solver::RPASusceptibility, TBTK::Solver::LindhardSusceptibility, and TBTK::Solver::MatsubaraSusceptibility.

void TBTK::Solver::Susceptibility::generateKPlusQLookupTable ( )

Generate lookup table for the k+q linear index. Can be called repeatedly, and the lookup table is only generated the first time.

Susceptibility::Algorithm TBTK::Solver::Susceptibility::getAlgorithm ( ) const
inline

Get the algorithm used to calculate the susceptibility.

bool TBTK::Solver::Susceptibility::getEnergiesAreInversionSymmetric ( ) const
inline

Get whether the susceptibility energies are inversion symmetric.

bool TBTK::Solver::Susceptibility::getIsMaster ( ) const
inlineprotected

Returns true if the Susceptibility is a master.

template<bool useKPlusQLookupTable>
int TBTK::Solver::Susceptibility::getKPlusQLinearIndex ( unsigned int  meshIndex,
const std::vector< double > &  k,
int  kLinearIndex 
) const
protected

Returns the linear index for k+q.

int * TBTK::Solver::Susceptibility::getKPlusQLookupTable ( )
inlineprotected

Returns the k+q lookup table.

const int * TBTK::Solver::Susceptibility::getKPlusQLookupTable ( ) const
inlineprotected

Returns the k+q lookup table.

void TBTK::Solver::Susceptibility::setEnergiesAreInversionSymmetric ( bool  energiesAreInversionSymmetric)
inline

Set to true if the susceptibility energies can be assumed to be inversion symmetric in the complex plane.

Important note: Only set this to true if the energies passed to setSusceptibilityEnergies() are on the form (-E_n, -E_{n-1}, ..., E_{n-1}, E_n). Setting this flag to true without fullfilling this condition will result in undefined behavior.


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