TBTK
|
Need a break? Support the development by playing Polarity Puzzles |
Solves a Model using the Chebyshev method. More...
#include <ChebyshevExpander.h>
Public Types | |
enum | Type { Advanced, Retarded, Principal, NonPrincipal } |
Public Member Functions | |
ChebyshevExpander () | |
virtual | ~ChebyshevExpander () |
void | setScaleFactor (double scaleFactor) |
double | getScaleFactor () |
void | setNumCoefficients (int numCoefficients) |
int | getNumCoefficients () const |
void | setBroadening (double broadening) |
double | getBroadening () const |
void | setEnergyResolution (int energyResolution) |
int | getEnergyResolution () const |
void | setLowerBound (double lowerBound) |
double | getLowerBound () const |
void | setUpperBound (double upperBound) |
double | getUpperBound () const |
void | setCalculateCoefficientsOnGPU (bool calculateCoefficientsOnGPU) |
bool | getCalculateCoefficientsOnGPU () const |
void | setGenerateGreensFunctionsOnGPU (bool generateGreensFunctionsOnGPU) |
bool | getGenerateGreensFunctionsOnGPU () const |
void | setUseLookupTable (bool useLookupTable) |
bool | getUseLookupTable () const |
std::vector< std::vector< std::complex< double > > > | calculateCoefficients (std::vector< Index > &to, Index from) |
std::vector< std::complex< double > > | calculateCoefficients (Index to, Index from) |
std::vector< std::complex< double > > | generateGreensFunction (const std::vector< std::complex< double >> &coefficients, Type type=Type::Retarded) |
Public Member Functions inherited from TBTK::Solver::Solver | |
Solver () | |
virtual | ~Solver () |
virtual void | setModel (Model &model) |
Model & | getModel () |
const Model & | getModel () const |
Public Member Functions inherited from TBTK::Communicator | |
Communicator (bool verbose) | |
void | setVerbose (bool verbose) |
bool | getVerbose () const |
Additional Inherited Members | |
Static Public Member Functions inherited from TBTK::Communicator | |
static void | setGlobalVerbose (bool globalVerbose) |
static bool | getGlobalVerbose () |
Solves a Model using the Chebyshev method.
The ChebyshevExpander can be used to calculate Green's function for a given Model using an expansion of the form
where \(F(x)\) is one of the functions \(\cos(x)\), \(\sin(x)\), \(e^{ix}\), and \(e^{-ix}\). The implementation is based on PhysRevLett.105.167006. The ChebyshevExpander can be run on CPU, GPU, or a mixture of both. The calculation of Chebyshev coefficients scales as \(O(n)\) with each of the following: dimension of the Hilbert space and number of Chebyshev coefficients. The generation of Green's functions scales as \(O(n)\) with the following: Number of coefficients, energy resolution, and the number of Green's functions.
Use the PropertyExtractor::ChebyshevExpander to calculate Properties.
|
strong |
Enum class describing the type of Green's function to calculate.
TBTK::Solver::ChebyshevExpander::ChebyshevExpander | ( | ) |
Constructs a Solver::ChebyshevExpander.
|
virtual |
Destructor.
|
inline |
Calculates the Chebyshev coefficients for \( G_{ij}(E)\), where \(i = \textrm{to}\) and \(j = \textrm{from}\).
to | 'To'-index, or \(i\). |
from | 'From'-index, or \(j\). |
coefficients | Pointer to array able to hold numCoefficients coefficients. |
numCoefficients | Number of coefficients to calculate. |
broadening | Broadening to use in convolusion of coefficients to remedy Gibb's osciallations. |
std::vector<std::vector<std::complex<double> > > TBTK::Solver::ChebyshevExpander::calculateCoefficients | ( | std::vector< Index > & | to, |
Index | from | ||
) |
Calculates the Chebyshev coefficients for \( G_{ij}(E)\), where \(i = \textrm{to}\) is a set of indices and \(j = \textrm{from}\).
to | vector of 'to'-indeces, or \(i\)'s. |
from | 'From'-index, or \(j\). |
coefficients | Pointer to array able to hold numCoefficients \(\times\)toIndeices.size() coefficients. |
numCoefficients | Number of coefficients to calculate for each to-index. |
broadening | Broadening to use in convolusion of coefficients to remedy Gibb's osciallations. |
|
inline |
Genererate Green's function. Uses lookup table generated by ChebyshevExpander::generateLookupTable. Runs on CPU.
greensFunction | Pointer to array able to hold Green's function. Has to be able to hold energyResolution elements. |
coefficients | Chebyshev coefficients calculated by ChebyshevExpander::calculateCoefficients. |
numCoefficients and energyResolution are here the values specified in the call to ChebyshevExpander::generateLookupTable
|
inline |
Get the broadening to use in convolusion of coefficients to remedy Gibb's osciallations.
|
inline |
Get whether Chebyshev coefficients are set to be calculated on GPU.
|
inline |
Get the number of energy point to use when generating Green's functions.
|
inline |
Get whether Green's functions are set to be generated on GPU.
|
inline |
Get the lower bound to use for the energy when generating the Green's function.
|
inline |
Get the number of Chebyshev coefficients to use during calculations.
|
inline |
Get scale factor.
|
inline |
Get the upper bound to use for the energy when generating the Green's function.
|
inline |
Set whether a lookup table should be used to when generating Green's functions.
|
inline |
Set the broadening to use in convolusion of coefficients to remedy Gibb's osciallations.
broadening | The broadening parameter to use. |
|
inline |
Set whether Chebyshev coefficients should be calculated on GPU. The default value is false.
calculateCoefficientsOnGPU | True to use GPU, false to use CPU. |
|
inline |
Set the number of energy point to use when generating Green's functions. The default value is 1000.
energyResolution | The number of energy points to use. |
|
inline |
Set whether Green's functions should be generated on GPU. The default value is false.
generateGreensFunctionsOnGPU | True to use GPU, false to use CPU. |
|
inline |
Set the lower bound to use for the energy when generating the Green's function. The default value is -1.
lowerBound | The lower bound for the energy. |
|
inline |
Set the number of Chebyshev coefficients to use during calculations. The default value is 1000.
numCoefficients | The number of Chebyshev coefficients. |
|
inline |
Overrides Solver::setModel(). Sets the scale factor that rescales the Hamiltonian to ensure that the energy spectrum of the Hamiltonian is bounded on the interval (-1, 1).
scaleFactor | The scale factor. |
|
inline |
Set the upper bound to use for the energy when generating the Green's function. The default value is 1.
upperBound | The upper bound for the energy. |
|
inline |
Set whether a lookup table should be used to when generating Green's functions.
useLookupTable | True to use a lookup table. |