TBTK
|
Need a break? Support the development by playing Polarity Puzzles |
Base class for energy resolved Properties. More...
#include <EnergyResolvedProperty.h>
Public Types | |
enum | EnergyType { Real, FermionicMatsubara, BosonicMatsubara } |
Public Types inherited from TBTK::Serializable | |
enum | Mode { Debug, Binary, XML, JSON } |
Public Member Functions | |
EnergyResolvedProperty () | |
EnergyResolvedProperty (double lowerBound, double upperBound, unsigned int resolution) | |
EnergyResolvedProperty (double lowerBound, double upperBound, unsigned int resolution, const DataType *data) | |
EnergyResolvedProperty (const std::vector< int > &ranges, double lowerBound, double upperBound, unsigned int resolution) | |
EnergyResolvedProperty (const std::vector< int > &ranges, double lowerBound, double upperBound, unsigned int resolution, const DataType *data) | |
EnergyResolvedProperty (const IndexTree &indexTree, double lowerBound, double upperBound, unsigned int resolution) | |
EnergyResolvedProperty (const IndexTree &indexTree, double lowerBound, double upperBound, unsigned int resolution, const DataType *data) | |
EnergyResolvedProperty (EnergyType energyType, const IndexTree &indexTree, int lowerMatsubaraEnergyIndex, int upperMatsubaraEnergtIndex, double fundamentalMatsubaraEnergy) | |
EnergyResolvedProperty (EnergyType energyType, const IndexTree &indexTree, int lowerMatsubaraEnergyIndex, int upperMatsubaraEnergtIndex, double fundamentalMatsubaraEnergy, const DataType *data) | |
EnergyResolvedProperty (const std::string &serialization, Serializable::Mode mode) | |
EnergyType | getEnergyType () const |
double | getLowerBound () const |
double | getUpperBound () const |
unsigned int | getResolution () const |
double | getDeltaE () const |
double | getEnergy (unsigned int n) const |
int | getLowerMatsubaraEnergyIndex () const |
int | getUpperMatsubaraEnergyIndex () const |
unsigned int | getNumMatsubaraEnergies () const |
double | getFundamentalMatsubaraEnergy () const |
double | getLowerMatsubaraEnergy () const |
double | getUpperMatsubaraEnergy () const |
std::complex< double > | getMatsubaraEnergy (unsigned int n) const |
unsigned int | getNumEnergies () const |
bool | energyWindowsAreEqual (const EnergyResolvedProperty &energyResolvedProperty, double precision=1e-1) const |
virtual std::string | serialize (Serializable::Mode mode) const |
Public Member Functions inherited from TBTK::Property::AbstractProperty< DataType > | |
unsigned int | getBlockSize () const |
unsigned int | getSize () const |
const std::vector< DataType > & | getData () const |
std::vector< DataType > & | getDataRW () |
unsigned int | getDimensions () const |
std::vector< int > | getRanges () const |
int | getOffset (const Index &index) const |
const IndexDescriptor & | getIndexDescriptor () const |
bool | contains (const Index &index) const |
void | reduce (const std::vector< Index > &targetPatterns, const std::vector< Index > &newPatterns) |
void | hermitianConjugate () |
std::vector< SparseMatrix< DataType > > | toSparseMatrices (const Model &model) const |
virtual const DataType & | operator() (const Index &index, unsigned int offset=0) const |
virtual DataType & | operator() (const Index &index, unsigned int offset=0) |
DataType & | operator() (const std::initializer_list< Subindex > &index) |
const DataType & | operator() (const std::initializer_list< Subindex > &index) const |
virtual const DataType & | operator() (unsigned int offset) const |
virtual DataType & | operator() (unsigned int offset) |
void | setAllowIndexOutOfBoundsAccess (bool allowIndexOutOfBoundsAccess) |
void | setDefaultValue (const DataType &defaultValue) |
void | replaceValues (const DataType &targetValue, const DataType &replacementValue) |
virtual std::string | toString () const |
Public Member Functions inherited from TBTK::Serializable | |
template<> | |
std::string | serialize (const bool &data, Mode mode) |
template<> | |
std::string | serialize (const double &data, Mode mode) |
template<> | |
std::string | serialize (const std::complex< double > &data, Mode mode) |
template<> | |
std::string | serialize (const int &data, Mode mode) |
template<> | |
std::string | serialize (const unsigned int &data, Mode mode) |
template<> | |
std::string | serialize (const SpinMatrix &data, Mode mode) |
template<> | |
std::string | serialize (const Statistics &data, Mode mode) |
template<> | |
std::string | serialize (const std::vector< std::complex< double >> &data, Mode mode) |
template<> | |
int | deserialize (const std::string &serialization, Mode mode) |
Protected Member Functions | |
EnergyResolvedProperty & | operator+= (const EnergyResolvedProperty &rhs) |
EnergyResolvedProperty & | operator-= (const EnergyResolvedProperty &rhs) |
EnergyResolvedProperty & | operator*= (const DataType &rhs) |
EnergyResolvedProperty & | operator/= (const DataType &rhs) |
Protected Member Functions inherited from TBTK::Property::AbstractProperty< DataType > | |
AbstractProperty () | |
AbstractProperty (unsigned int blockSize) | |
AbstractProperty (unsigned int blockSize, const DataType *data) | |
AbstractProperty (const std::vector< int > &ranges, unsigned int blockSize) | |
AbstractProperty (const std::vector< int > &ranges, unsigned int blockSize, const DataType *data) | |
AbstractProperty (const IndexTree &indexTree, unsigned int blockSize) | |
AbstractProperty (const IndexTree &indexTree, unsigned int blockSize, const DataType *data) | |
AbstractProperty (const AbstractProperty &abstractProperty) | |
AbstractProperty (AbstractProperty &&abstractProperty) | |
AbstractProperty (const std::string &serialization, Mode mode) | |
virtual | ~AbstractProperty () |
AbstractProperty & | operator= (const AbstractProperty &abstractProperty) |
AbstractProperty & | operator= (AbstractProperty &&abstractProperty) |
AbstractProperty & | operator+= (const AbstractProperty &rhs) |
AbstractProperty & | operator-= (const AbstractProperty &rhs) |
AbstractProperty & | operator*= (const DataType &rhs) |
AbstractProperty & | operator/= (const DataType &rhs) |
Protected Member Functions inherited from TBTK::Property::Property | |
Property () | |
virtual | ~Property () |
Additional Inherited Members | |
Static Public Member Functions inherited from TBTK::Serializable | |
static bool | hasID (const std::string &serialization, Mode mode) |
static std::string | getID (const std::string &serialization, Mode mode) |
static std::string | extractComponent (const std::string &serialization, const std::string &containerID, const std::string &componentID, const std::string &componentName, Mode mode) |
Static Protected Member Functions inherited from TBTK::Serializable | |
static bool | validate (const std::string &serialization, const std::string &id, Mode mode) |
static std::string | getContent (const std::string &serialization, Mode mode) |
static std::vector< std::string > | split (const std::string &content, Mode mode) |
template<typename DataType > | |
static std::enable_if<!std::is_pointer< DataType >::value, std::string >::type | serialize (const DataType &data, Mode mode) |
template<typename DataType > | |
static std::enable_if< std::is_pointer< DataType >::value, std::string >::type | serialize (const DataType &data, Mode mode) |
template<typename DataType > | |
static DataType | deserialize (const std::string &serialization, Mode mode) |
static std::string | extract (const std::string &serialization, Mode mode, std::string component) |
Base class for energy resolved Properties.
The EnergyResolvedProperty is a base class for energy dependent Properties. For more information about specific EnergyDependentProperties, see:
If the EnergyResolvedProperty has no Index structure, it contains a single block, otherwise it contains one block per Index. Inside of a block, values are stored for a range of energies. See AbstractProperty for more information about blocks.
The EnergyResolvedProperty can have one of three different energy types. Depending on the EnergyType, different member functions are usefull. It is possible to get the EnergyType using
The data is stored for a range of real energies on a regular grid of on an interval [lowerBound, upperBound]. It is possible to get the lower and upper bound and the number of points with which the energy grid is resolved using
It is also possible to get the distance \(\Delta E\) between neighboring points and the energy for specific points on the grid using
Not yet publicly supported.
|
strong |
Enum class for specifying the energy type.
TBTK::Property::EnergyResolvedProperty< DataType >::EnergyResolvedProperty |
Constructs an uninitialized EnergyResolvedProperty.
TBTK::Property::EnergyResolvedProperty< DataType >::EnergyResolvedProperty | ( | double | lowerBound, |
double | upperBound, | ||
unsigned int | resolution | ||
) |
Constructs an EnergyResolvedProperty with real energies on the None format. [See AbstractProperty for detailed information about the None format.]
lowerBound | Lower bound for the energy. |
upperBound | Upper bound for the energy. |
resolution | Number of points to use for the energy. |
TBTK::Property::EnergyResolvedProperty< DataType >::EnergyResolvedProperty | ( | double | lowerBound, |
double | upperBound, | ||
unsigned int | resolution, | ||
const DataType * | data | ||
) |
Constructs an EnergyResolvedProperty with real energies on the None format. [See AbstractProperty for detailed information about the None format.]
lowerBound | Lower bound for the energy. |
upperBound | Upper bound for the energy. |
resolution | Number of points to use for the energy. |
data | Raw data to initialize the EnergyResolvedProperty with. |
TBTK::Property::EnergyResolvedProperty< DataType >::EnergyResolvedProperty | ( | const std::vector< int > & | ranges, |
double | lowerBound, | ||
double | upperBound, | ||
unsigned int | resolution | ||
) |
Construct an EnergyResolvedProperty with real energies on the Ranges format. [See AbstractProperty for detailed information about the Ranges format.]
ranges | A list of upper limits for the ranges of the different dimensions. The nth dimension will have the range [0, ranges[n]). |
lowerBound | Lower bound for the energy. |
upperBound | Upper bound for the energy. |
resolution | Number of points to use for the energy. |
TBTK::Property::EnergyResolvedProperty< DataType >::EnergyResolvedProperty | ( | const std::vector< int > & | ranges, |
double | lowerBound, | ||
double | upperBound, | ||
unsigned int | resolution, | ||
const DataType * | data | ||
) |
Construct an EnergyResolvedProperty with real energies on the Ranges format. [See AbstractProperty for detailed information about the Ranges format.]
ranges | A list of upper limits for the ranges of the different dimensions. The nth dimension will have the range [0, ranges[n]). |
lowerBound | Lower bound for the energy. |
upperBound | Upper bound for the energy. |
resolution | Number of points to use for the energy. |
data | Raw data to initialize the EnergyResolvedProperty with. |
TBTK::Property::EnergyResolvedProperty< DataType >::EnergyResolvedProperty | ( | const IndexTree & | indexTree, |
double | lowerBound, | ||
double | upperBound, | ||
unsigned int | resolution | ||
) |
Constructs an EnergyResolvedProperty with real energies on the Custom format. [See AbstractProperty for detailed information about the Custom format.]
indexTree | IndexTree containing the Indices for which the EnergyResolvedProperty should be contained. |
lowerBound | Lower bound for the energy. |
upperBound | Upper bound for the energy. |
resolution | Number of points to use for the energy. |
TBTK::Property::EnergyResolvedProperty< DataType >::EnergyResolvedProperty | ( | const IndexTree & | indexTree, |
double | lowerBound, | ||
double | upperBound, | ||
unsigned int | resolution, | ||
const DataType * | data | ||
) |
Constructs an EnergyResolvedProperty with real energie on the Custom format and initializes it with data. [See AbstractProperty for detailed information about the Custom format and the raw data format.]
indexTree | IndexTree containing the Indices for which the EnergyResolvedProperty should be contained. |
lowerBound | Lower bound for the energy. |
upperBound | Upper bound for the energy. |
resolution | Number of points to use for the energy. |
data | Raw data to initialize the EnergyResolvedProperty with. |
TBTK::Property::EnergyResolvedProperty< DataType >::EnergyResolvedProperty | ( | EnergyType | energyType, |
const IndexTree & | indexTree, | ||
int | lowerMatsubaraEnergyIndex, | ||
int | upperMatsubaraEnergtIndex, | ||
double | fundamentalMatsubaraEnergy | ||
) |
Constructs an EnergyResolvedProperty with Matsubara energies on the Custom format. [See AbstractProperty for detailed information about the Custom format.]
indexTree | IndexTree containing the Indices for which the EnergyResolvedProperty should be contained. |
lowerBound | Lower bound for the energy. |
upperBound | Upper bound for the energy. |
resolution | Number of points to use for the energy. |
TBTK::Property::EnergyResolvedProperty< DataType >::EnergyResolvedProperty | ( | EnergyType | energyType, |
const IndexTree & | indexTree, | ||
int | lowerMatsubaraEnergyIndex, | ||
int | upperMatsubaraEnergtIndex, | ||
double | fundamentalMatsubaraEnergy, | ||
const DataType * | data | ||
) |
Constructs an EnergyResolvedProperty with Matsubara energies on the Custom format and initializes it with data. [See AbstractProperty for detailed information about the Custom format and the raw data format.]
indexTree | IndexTree containing the Indices for which the EnergyResolvedProperty should be contained. |
lowerBound | Lower bound for the energy. |
upperBound | Upper bound for the energy. |
resolution | Number of points to use for the energy. |
data | Raw data to initialize the EnergyResolvedProperty with. |
TBTK::Property::EnergyResolvedProperty< DataType >::EnergyResolvedProperty | ( | const std::string & | serialization, |
Serializable::Mode | mode | ||
) |
Constructor. Constructs the EnergyResolvedProperty from a serialization string.
serialization | Serialization string from which to construct the EnergyResolvedProperty. |
|
inline |
Check whether the energy windows are equal. The energy windows are considered equal if the number of energies are equal and the upper and lower bounds (upper and lower Matsubara frequencies) are the same within a given relative precision.
energyResolvedProperty | The EnergyResolvedProperty to compare with. |
precision | The required precision with which the bounds must agree. A value of 1 means that the difference between the bounds must be no larger than the difference between two succesive energy points. |
|
inline |
Get the step length \(\Delta E\) between neigboring energy indices.
|
inline |
Get the nth energy value.
n | The energy index to get the energy for. |
|
inline |
Get the fundamental Matsubara energy E_0 in the expression E = (l + 2*n)*E_0.
|
inline |
Get lower bound for the energy.
|
inline |
Get the lower Matsubara energy.
|
inline |
Get the lower Matsubara energy index. That is, l in the expression E = (l + 2*n)*E_0.
|
inline |
Get the nth Matsubara energy.
|
inline |
Get the number of energies. The same as EnergyResolvedProperty::getResolution() for EnergyType::Real and EnergyResolvedProperty::getNumMatsubaraEnergies() for EnergyType::FermionicMatsubara and EnergyTpe::BosnicMatsubara.
|
inline |
Get the number of Matsubara energies.
|
inline |
Get the energy resolution (number of points used for the energy axis).
|
inline |
Get upper bound for the energy.
|
inline |
Get the upper Matsubara energy.
|
inline |
Get the upper Matsubara energy index. That is, l+N-1, where l is the lowest Matsubara energy index and N is the number of Matsubara energies.
|
inlineprotected |
Overrides AbstractProperty::operator*=().
|
inlineprotected |
Overrides AbstractProperty::operator+=().
|
inlineprotected |
Overrides AbstractProperty::operator-=().
|
inlineprotected |
Overrides AbstractProperty::operator/=().
|
inlinevirtual |
Overrides AbstractProperty::serialize().
Reimplemented from TBTK::Property::AbstractProperty< DataType >.
Reimplemented in TBTK::Property::LDOS, TBTK::Property::DOS, and TBTK::Property::SpinPolarizedLDOS.