Class used to store the "vector" of out-of-equilibrium populations. More...
#include <vector_bte.h>


Public Member Functions | |
| VectorBTE (StatisticsSweep &statisticsSweep_, BaseBandStructure &bandStructure_, const int &dimensionality_=3) | |
| Constructor method, initializes raw buffer data and saves helper variables. More... | |
| VectorBTE (const VectorBTE &that) | |
| Copy constructor. | |
| VectorBTE & | operator= (const VectorBTE &that) |
| Copy assignment operator. | |
| double & | operator() (const int &iCalc, const int &iDim, const int &iState) |
| Get and set operator. | |
| const double & | operator() (const int &iCalc, const int &iDim, const int &iState) const |
| Const get and set operator. | |
| Eigen::MatrixXd | dot (const VectorBTE &that) |
| Computes the scalar product between two VectorBTE objects. More... | |
| VectorBTE | operator* (VectorBTE &that) |
| element wise product between two VectorBTE objects x and y. More... | |
| VectorBTE | operator* (const double &scalar) |
| Computes the product of a VectorBTE with a scalar, i.e. More... | |
| VectorBTE | operator* (const Eigen::MatrixXd &vector) |
| Computes the product of a VectorBTE with a vector. More... | |
| VectorBTE | operator* (ParallelMatrix< double > &matrix) |
| Computes the product of a VectorBTE with a parallel matrix. More... | |
| VectorBTE | operator+ (VectorBTE &that) |
| element wise sum between two VectorBTE objects x and y. More... | |
| VectorBTE | operator- (VectorBTE &that) |
| element wise difference between two VectorBTE objects x and y. More... | |
| VectorBTE | operator- () |
| Invert the sign of the VectorBTE content i.e. More... | |
| VectorBTE | operator/ (VectorBTE &that) |
| element wise division between two VectorBTE objects x and y. More... | |
| VectorBTE | sqrt () |
| Return a new VectorBTE object containing the square root of this one (element-wise x -> sqrt(x) ). | |
| VectorBTE | reciprocal () const |
| Return a new VectorBTE object containing the reciprocal of this one (element-wise x -> 1/x). | |
| void | canonical2Population () |
| Convert an out-of-equilibrium population from the canonical form f to the absolute value n, such that n = bose(bose+1)f or n=fermi(1-fermi)f. | |
| void | population2Canonical () |
| Convert an out-of-equilibrium population from the absolute value n to the canonical value n, such that n = bose(bose+1)f or n=fermi(1-fermi)f. | |
| void | outputToJSON (const std::string &outFileName, BaseBandStructure &outerBandStructure) |
| Output the contents of a vector BTE object to a JSON file. | |
| int | glob2Loc (const ChemPotIndex &imu, const TempIndex &it, const CartIndex &iDim) const |
| glob2Loc and loc2Glob compress/decompress the indices on temperature, chemical potential, and cartesian direction into/from a single index. More... | |
| std::tuple< ChemPotIndex, TempIndex, CartIndex > | loc2Glob (const int &i) const |
| void | setConst (const double &constant) |
| Set the whole content (raw buffer) of BaseVectorBTE to a scalar value. More... | |
| int | getNumStates () |
| return the number of states in this vector BTE object More... | |
Public Attributes | |
| Eigen::MatrixXd | data |
| raw buffer containing the values of the vector The matrix has size (numCalculations, numStates), where numCalculations is the number of pairs of temperature and chemical potentials, and numStates is the number of Bloch states used in the Boltzmann equation. | |
| std::vector< int > | excludeIndices |
| List of Bloch states to be excluded from the calculation (i.e. More... | |
| int | dimensionality |
Protected Member Functions | |
| VectorBTE | baseOperator (VectorBTE &that, const int &operatorType) |
| base class to implement +, -, / and * operations. More... | |
Protected Attributes | |
| StatisticsSweep & | statisticsSweep |
| int | numCalculations |
| int | numStates |
| int | numChemPots |
| int | numTemps |
| BaseBandStructure & | bandStructure |
| const int | operatorSums = 0 |
| const int | operatorDivs = 1 |
| const int | operatorProd = 2 |
| const int | operatorDiff = 3 |
Friends | |
| class | ScatteringMatrix |
The vector indices are over the Bloch state. Additionally, there is one of these vector for each pair of (temperatures,chemicalPotentials). Can be used to store both scalar quantities (linewidths) or vectors (like velocities).
| VectorBTE::VectorBTE | ( | StatisticsSweep & | statisticsSweep_, |
| BaseBandStructure & | bandStructure_, | ||
| const int & | dimensionality_ = 3 |
||
| ) |
| statisticsSweep | saves the info on how many temperatures/chemical potentials we are evaluating. |
| bandStructure | saves the underlying band structure for which we compute the out-of-equilibrium populations. |
| dimensionality | determines the size of the vector on cartesian indices. 1 for scalar quantities like linewidths Gamma(BlochIndices), 3 for vector quantities like phonon populations f(blochIndices,cartesian). |

It's split separately so that subclasses can create the correct output class, and also because operations are rather similar.


| Eigen::MatrixXd VectorBTE::dot | ( | const VectorBTE & | that | ) |
The scalar product of x and y, is defined such as z(iCalc) = sum_i x(iCalc,i) y(iCalc,i), where i is an index over Bloch states, and iCalc is an index over temperatures and chemical potentials.
| that | the second vector used in the scalar product |


| int VectorBTE::getNumStates | ( | ) |
| int VectorBTE::glob2Loc | ( | const ChemPotIndex & | imu, |
| const TempIndex & | it, | ||
| const CartIndex & | iDim | ||
| ) | const |
TODO: these indices, and how they are used elsewhere, is rather messy That's because we have to work both with quantities such as line-widths, which are a scalar over the Bloch states, and phonon populations, which are cartesian vectors over the Bloch states. I should probably create two different classes for these.

| VectorBTE VectorBTE::operator* | ( | const double & | scalar | ) |
all elements of vectorBTE x -> x * scalar.
| scalar | a double with the constant factor to be used in the element-wise multiplication. |
| VectorBTE VectorBTE::operator* | ( | const Eigen::MatrixXd & | vector | ) |
The vector has size equal to the number of calculations (i.e. number of temperatures times the number of chemical potentials) used in the run. Given a calculation index iCalc, the result is an element-wise x(it)*vector(it).
| vector | a double vector to be used in the product, of size equal to numCalculations. |

| VectorBTE VectorBTE::operator* | ( | ParallelMatrix< double > & | matrix | ) |
Only works if the number of temperatures/chemical potentials (numCalculations) is equal to one. At fixed calculation index iCalc, the result is an matrix-vector multiplication x(it,i)*pMatrix(i,j).
| pMatrix | a parallel distributed double matrix to be used in the product, of size equal to numStates x numStates. |

If the dimensionality of the two objects is the same, we compute element-wise result = x*y. If y has dimensionality 1, we compute x(every dim)*y(0), and the result has the dimensionality of x.
| that | the second VectorBTE object y, such that result = *this*y |

If the dimensionality of the two objects is the same, we compute element-wise result = x+y. If y has dimensionality 1, we compute x(every dim)+y(0), and the result has the dimensionality of x.
| that | the second VectorBTE object y, such that result = *this+y |

| VectorBTE VectorBTE::operator- | ( | ) |
x -> -x
If the dimensionality of the two objects is the same, we compute element-wise result = x-y. If y has dimensionality 1, we compute x(every dim)-y(0), and the result has the dimensionality of x.
| that | the second VectorBTE object y, such that result = *this-y |

If the dimensionality of the two objects is the same, we compute element-wise result = x/y. If y has dimensionality 1, we compute x(every dim)/y(0), and the result has the dimensionality of x.
| that | the second VectorBTE object y, such that result = *this/y |

| void VectorBTE::setConst | ( | const double & | constant | ) |
| constant | the value to be used in the set. |

| std::vector<int> VectorBTE::excludeIndices |
for which vectorBTE values are 0), for example, the acoustic modes at the gamma point, whose zero frequencies may cause problems.