TBTK
Need a break? Support the development by playing Polarity Puzzles
TBTK::PropertyExtractor::ChebyshevExpander Class Reference

Extracts physical properties from Solver::ChebyshevExpander. More...

#include <ChebyshevExpander.h>

Inheritance diagram for TBTK::PropertyExtractor::ChebyshevExpander:
TBTK::PropertyExtractor::PropertyExtractor

Public Member Functions

 ChebyshevExpander (Solver::ChebyshevExpander &cSolver)
 
virtual ~ChebyshevExpander ()
 
virtual void setEnergyWindow (double lowerBound, double upperBound, int energyResolution)
 
Property::GreensFunction calculateGreensFunction (Index to, Index from, Property::GreensFunction::Type type=Property::GreensFunction::Type::Retarded)
 
Property::GreensFunction calculateGreensFunction (std::vector< std::vector< Index >> patterns, Property::GreensFunction::Type type=Property::GreensFunction::Type::Retarded)
 
Property::GreensFunction calculateGreensFunctions (std::vector< Index > &to, Index from, Property::GreensFunction::Type type=Property::GreensFunction::Type::Retarded)
 
virtual std::complex< double > calculateExpectationValue (Index to, Index from)
 
virtual Property::Density calculateDensity (Index pattern, Index ranges)
 
virtual Property::Density calculateDensity (std::vector< Index > patterns)
 
virtual Property::Magnetization calculateMagnetization (Index pattern, Index ranges)
 
virtual Property::Magnetization calculateMagnetization (std::vector< Index > patterns)
 
virtual Property::LDOS calculateLDOS (Index pattern, Index ranges)
 
virtual Property::LDOS calculateLDOS (std::vector< Index > patterns)
 
virtual Property::SpinPolarizedLDOS calculateSpinPolarizedLDOS (Index pattern, Index ranges)
 
virtual Property::SpinPolarizedLDOS calculateSpinPolarizedLDOS (std::vector< Index > patterns)
 
- Public Member Functions inherited from TBTK::PropertyExtractor::PropertyExtractor
 PropertyExtractor ()
 
virtual ~PropertyExtractor ()
 
virtual void setEnergyWindow (int lowerFermionicMatsubaraEnergyIndex, int upperFermionicMatsubaraEnergyIndex, int lowerBosonicMatsubaraEnergyIndex, int upperBosonicMatsubaraEnergyIndex)
 
virtual void setEnergyInfinitesimal (double energyInfinitesimal)
 
virtual Property::DOS calculateDOS ()
 
virtual Property::DOS sampleDOS (unsigned int numSamples, const std::vector< Index > &patterns={}, unsigned int seed=time(nullptr))
 
virtual double calculateEntropy ()
 

Additional Inherited Members

- Protected Types inherited from TBTK::PropertyExtractor::PropertyExtractor
enum  EnergyType { Real, Matsubara }
 
- Protected Member Functions inherited from TBTK::PropertyExtractor::PropertyExtractor
EnergyType getEnergyType () const
 
int getEnergyResolution () const
 
double getLowerBound () const
 
double getUpperBound () const
 
int getLowerFermionicMatsubaraEnergyIndex () const
 
int getUpperFermionicMatsubaraEnergyIndex () const
 
int getLowerBosonicMatsubaraEnergyIndex () const
 
int getUpperBosonicMatsubaraEnergyIndex () const
 
double getEnergyInfinitesimal () const
 
template<typename DataType >
void calculate (void(*callback)(PropertyExtractor *cb_this, Property::Property &property, const Index &index, int offset, Information &information), Property::AbstractProperty< DataType > &property, Index pattern, const Index &ranges, int currentOffset, int offsetMultiplier, Information &information)
 
template<typename DataType >
void calculate (void(*callback)(PropertyExtractor *cb_this, Property::Property &property, const Index &index, int offset, Information &information), const IndexTree &allIndices, const IndexTree &memoryLayout, Property::AbstractProperty< DataType > &abstractProperty, Information &information)
 
void ensureCompliantRanges (const Index &pattern, Index &ranges)
 
std::vector< int > getLoopRanges (const Index &pattern, const Index &ranges)
 
IndexTree generateIndexTree (std::vector< Index > patterns, const HoppingAmplitudeSet &hoppingAmplitudeSet, bool keepSummationWildcards, bool keepSpinWildcards)
 

Detailed Description

Extracts physical properties from Solver::ChebyshevExpander.

The PropertyExtractor::ChebyshevExpander extracts Properties from the Solver::ChebyshevExpander.

Example

#include "TBTK/Model.h"
#include "TBTK/Streams.h"
#include "TBTK/TBTK.h"
using namespace TBTK;
using namespace Visualization::MatPlotLib;
int main(){
const unsigned int SIZE_X = 100;
const unsigned int SIZE_Y = 100;
double t = 1;
Model model = Models::SquareLattice({SIZE_X, SIZE_Y}, {0, t});
model.construct();
solver.setModel(model);
solver.setScaleFactor(10);
solver.setUseLookupTable(true);
solver.setNumCoefficients(200);
const double LOWER_BOUND = -5;
const double UPPER_BOUND = 5;
const int RESOLUTION = 200;
PropertyExtractor::ChebyshevExpander propertyExtractor(solver);
propertyExtractor.setEnergyWindow(
LOWER_BOUND,
UPPER_BOUND,
RESOLUTION
);
Property::LDOS ldos = propertyExtractor.calculateLDOS({{50, 50}});
Streams::out << ldos << "\n";
Plotter plotter;
plotter.plot({50, 50}, ldos);
plotter.save("figures/LDOS.png");
}

Output

LDOS
Number of sites: 1
Lower bound: -5 eV (-5 n.u.)
Upper bound: 5 eV (5 n.u.)
Resolution: 200

Constructor & Destructor Documentation

◆ ChebyshevExpander()

TBTK::PropertyExtractor::ChebyshevExpander::ChebyshevExpander ( Solver::ChebyshevExpander cSolver)

Constructor.

◆ ~ChebyshevExpander()

virtual TBTK::PropertyExtractor::ChebyshevExpander::~ChebyshevExpander ( )
virtual

Destructor.

Member Function Documentation

◆ calculateDensity() [1/2]

virtual Property::Density TBTK::PropertyExtractor::ChebyshevExpander::calculateDensity ( Index  pattern,
Index  ranges 
)
virtual

◆ calculateDensity() [2/2]

virtual Property::Density TBTK::PropertyExtractor::ChebyshevExpander::calculateDensity ( std::vector< Index patterns)
virtual

◆ calculateExpectationValue()

virtual std::complex<double> TBTK::PropertyExtractor::ChebyshevExpander::calculateExpectationValue ( Index  to,
Index  from 
)
virtual

◆ calculateGreensFunction() [1/2]

Property::GreensFunction TBTK::PropertyExtractor::ChebyshevExpander::calculateGreensFunction ( Index  to,
Index  from,
Property::GreensFunction::Type  type = Property::GreensFunction::Type::Retarded 
)

Calculate Green's function.

◆ calculateGreensFunction() [2/2]

Property::GreensFunction TBTK::PropertyExtractor::ChebyshevExpander::calculateGreensFunction ( std::vector< std::vector< Index >>  patterns,
Property::GreensFunction::Type  type = Property::GreensFunction::Type::Retarded 
)

Calculate Green's function for a range of 'to'-indices.

◆ calculateGreensFunctions()

Property::GreensFunction TBTK::PropertyExtractor::ChebyshevExpander::calculateGreensFunctions ( std::vector< Index > &  to,
Index  from,
Property::GreensFunction::Type  type = Property::GreensFunction::Type::Retarded 
)

Calculate Green's function for a range of 'to'-indices.

◆ calculateLDOS() [1/2]

virtual Property::LDOS TBTK::PropertyExtractor::ChebyshevExpander::calculateLDOS ( Index  pattern,
Index  ranges 
)
virtual

◆ calculateLDOS() [2/2]

virtual Property::LDOS TBTK::PropertyExtractor::ChebyshevExpander::calculateLDOS ( std::vector< Index patterns)
virtual

◆ calculateMagnetization() [1/2]

virtual Property::Magnetization TBTK::PropertyExtractor::ChebyshevExpander::calculateMagnetization ( Index  pattern,
Index  ranges 
)
virtual

◆ calculateMagnetization() [2/2]

virtual Property::Magnetization TBTK::PropertyExtractor::ChebyshevExpander::calculateMagnetization ( std::vector< Index patterns)
virtual

◆ calculateSpinPolarizedLDOS() [1/2]

virtual Property::SpinPolarizedLDOS TBTK::PropertyExtractor::ChebyshevExpander::calculateSpinPolarizedLDOS ( Index  pattern,
Index  ranges 
)
virtual

◆ calculateSpinPolarizedLDOS() [2/2]

virtual Property::SpinPolarizedLDOS TBTK::PropertyExtractor::ChebyshevExpander::calculateSpinPolarizedLDOS ( std::vector< Index patterns)
virtual

◆ setEnergyWindow()

virtual void TBTK::PropertyExtractor::ChebyshevExpander::setEnergyWindow ( double  lowerBound,
double  upperBound,
int  energyResolution 
)
virtual

The documentation for this class was generated from the following file:
Plotter.h
Plots data.
TBTK::Solver::ChebyshevExpander::setCalculateCoefficientsOnGPU
void setCalculateCoefficientsOnGPU(bool calculateCoefficientsOnGPU)
Definition: ChebyshevExpander.h:565
TBTK::Model
Container of Model related information.
Definition: Model.h:57
TBTK::Solver::ChebyshevExpander::setScaleFactor
void setScaleFactor(double scaleFactor)
Definition: ChebyshevExpander.h:492
Model.h
Container of Model related information.
Streams.h
Streams for TBTK output.
TBTK::Property::LDOS
Property container for the local density of states (LDOS).
Definition: LDOS.h:48
TBTK::Solver::ChebyshevExpander::setUseLookupTable
void setUseLookupTable(bool useLookupTable)
Definition: ChebyshevExpander.h:585
TBTK::Initialize
void Initialize()
TBTK::Solver::Solver::setModel
virtual void setModel(Model &model)
Definition: Solver.h:69
ChebyshevExpander.h
Solves a Model using the Chebyshev method.
TBTK::PropertyExtractor::ChebyshevExpander
Extracts physical properties from Solver::ChebyshevExpander.
Definition: ChebyshevExpander.h:51
SquareLattice.h
Square lattice model.
TBTK::Solver::ChebyshevExpander
Solves a Model using the Chebyshev method.
Definition: ChebyshevExpander.h:69
TBTK::Streams::out
static std::ostream out
Definition: Streams.h:70
TBTK::Solver::ChebyshevExpander::setNumCoefficients
void setNumCoefficients(int numCoefficients)
Definition: ChebyshevExpander.h:505
ChebyshevExpander.h
Extracts physical properties from the ChebyshevExpander.
TBTK.h
TBTK initialization.
TBTK::Model::construct
void construct()
TBTK::Solver::ChebyshevExpander::setGenerateGreensFunctionsOnGPU
void setGenerateGreensFunctionsOnGPU(bool generateGreensFunctionsOnGPU)
Definition: ChebyshevExpander.h:575
TBTK::Models::SquareLattice
Square lattice model.
Definition: SquareLattice.h:60