1 #ifndef ACT_BAND_STRUCTURE_H
2 #define ACT_BAND_STRUCTURE_H
4 #include "bandstructure.h"
9 #include "statistics_sweep.h"
39 const bool &withVelocities);
69 int getNumPoints(
const bool &useFullGrid =
false)
override;
79 int getFullNumBands()
override;
113 std::tuple<WavevectorIndex, BandIndex>
getIndex(
const int &is)
override;
265 Eigen::Tensor<std::complex<double>, 3> &velocities_)
override;
278 static std::tuple<ActiveBandStructure, StatisticsSweep>
280 const bool &withEigenvectors =
true,
281 const bool &withVelocities =
true,
const bool &forceBuildAPP =
false);
315 const Eigen::Vector3d &x,
const int &basis = Points::crystalCoordinates)
override;
380 const bool &suppressError =
false)
override;
398 std::vector<double> energies;
399 std::vector<std::complex<double>> velocities, eigenvectors;
401 bool hasEigenvectors =
false;
402 bool hasVelocities =
false;
408 Eigen::VectorXi numBands;
409 int numFullBands = 0;
410 int windowMethod = 0;
414 Eigen::MatrixXi auxBloch2Comb;
415 Eigen::VectorXi cumulativeKbOffset;
416 Eigen::MatrixXi bteAuxBloch2Comb;
417 Eigen::VectorXi bteCumulativeKbOffset;
418 Eigen::VectorXi cumulativeKbbOffset;
422 void buildSymmetries();
427 size_t velBloch2Comb(
const int &ik,
const int &ib1,
const int &ib2,
429 size_t eigBloch2Comb(
const int &ik,
const int &ibFull,
const int &ibRed);
430 size_t bloch2Comb(
const int &k,
const int &b);
431 std::tuple<int, int> comb2Bloch(
const int &is);
433 size_t bteBloch2Comb(
const int &k,
const int &b);
434 std::tuple<int, int> bteComb2Bloch(
const int &is);
437 const bool &withEigenvectors =
true,
438 const bool &withVelocities =
true);
442 const bool &withEigenvector =
true,
443 const bool &withVelocities =
true);
Class container of the quasiparticle band structure, i.e.
Definition: active_bandstructure.h:22
ActiveBandStructure(Particle &particle_, Points &points_)
Almost empty constructor, to be used internally.
Definition: active_bandstructure.cpp:10
std::tuple< int, Eigen::Matrix3d > getRotationToIrreducible(const Eigen::Vector3d &x, const int &basis=Points::crystalCoordinates) override
Given a point in crystal or cartesian coordinates, returns the index of the irreducible point and the...
Definition: active_bandstructure.cpp:1229
StateIndex bteToState(BteIndex &iBteIndex) override
Utility method to convert an index over Bloch states in a VectorBTE into the Bloch state index in the...
Definition: active_bandstructure.cpp:1219
std::vector< Eigen::Matrix3d > getRotationsStar(WavevectorIndex &ikIndex) override
Given a irreducible point index, find the list of rotations to reconstruct the equivalent points.
Definition: active_bandstructure.cpp:1194
int getNumBands() override
Returns the number of bands.
Definition: active_bandstructure.cpp:215
Point getPoint(const int &pointIndex) override
Returns a wavevector, given a wavevector index.
Definition: active_bandstructure.cpp:199
Particle getParticle() override
Get the Particle object associated with this class.
Definition: active_bandstructure.cpp:195
Points getPoints() override
Returns the wavevectors on which the band structure is computed.
Definition: active_bandstructure.cpp:197
size_t getIndex(const WavevectorIndex &ik, const BandIndex &ib) override
Builds a Bloch state index, which runs on both wavevector index and band index.
Definition: active_bandstructure.cpp:236
double getMaxEnergy() override
Returns the maximum energy value.
Definition: active_bandstructure.cpp:278
int getPointIndex(const Eigen::Vector3d &crystalCoordinates, const bool &suppressError=false) override
Find the index of a point in the reducible list of points, given its coordinates in the crystal basis...
Definition: active_bandstructure.cpp:1234
BteIndex stateToBte(StateIndex &isIndex) override
Utility method to convert an index over Bloch states in the band structure into a Bloch state index u...
Definition: active_bandstructure.cpp:1205
bool getIsDistributed() override
Returns if this band structure is distributed.
Definition: active_bandstructure.cpp:234
int getNumPoints(const bool &useFullGrid=false) override
Returns the total number of k/q-points.
Definition: active_bandstructure.cpp:207
Eigen::Vector3d getWavevector(StateIndex &is) override
Returns the energy of a quasiparticle from its Bloch index Used for accessing the band structure in t...
Definition: active_bandstructure.cpp:357
const double & getEnergy(StateIndex &is) override
Returns the energy of a quasiparticle from its Bloch index.
Definition: active_bandstructure.cpp:259
StatisticsSweep buildAsPostprocessing(Context &context, Points points_, HarmonicHamiltonian &h0, const bool &withEigenvector=true, const bool &withVelocities=true)
in this function, useful for electrons, we first compute the band structure on a dense grid of waveve...
Definition: active_bandstructure.cpp:833
static std::tuple< ActiveBandStructure, StatisticsSweep > builder(Context &context, HarmonicHamiltonian &h0, Points &points, const bool &withEigenvectors=true, const bool &withVelocities=true, const bool &forceBuildAPP=false)
Preferred method to initialize the ActiveBandStructure class.
Definition: active_bandstructure.cpp:503
std::vector< int > irrStateIterator() override
Iterator over the Bloch states in the band structure, over just the irreducible wavevectors,...
Definition: active_bandstructure.cpp:1161
Eigen::MatrixXcd getEigenvectors(WavevectorIndex &ik) override
Obtain the eigenvectors of the quasiparticles at a specified wavevector.
Definition: active_bandstructure.cpp:326
int getNumStates() override
Returns the total number of Bloch states, equal to numPoints*numBands.
Definition: active_bandstructure.cpp:257
std::vector< int > parallelIrrStateIterator() override
Iterator over the Bloch states in the band structure, distributed over MPI processes,...
Definition: active_bandstructure.cpp:1174
Eigen::MatrixXd getGroupVelocities(WavevectorIndex &ik) override
Returns the group velocity of a quasiparticle for all bands at a specified wavevector index.
Definition: active_bandstructure.cpp:299
void setEnergies(Point &point, Eigen::VectorXd &energies_) override
Method to save quasiparticle energies inside ActiveBandStructure().
Definition: active_bandstructure.cpp:367
Eigen::Tensor< std::complex< double >, 3 > getVelocities(WavevectorIndex &ik) override
Returns the velocity operator (including off-diagonal matrix elements) of the quasiparticles at the s...
Definition: active_bandstructure.cpp:312
void setEigenvectors(Point &point, Eigen::MatrixXcd &eigenvectors_) override
Method to save quasiparticle eigenvectors inside ActiveBandStructure.
Definition: active_bandstructure.cpp:385
std::vector< int > irrPointsIterator() override
Iterator over the irreducible points indices.
Definition: active_bandstructure.cpp:1185
Eigen::Vector3d getGroupVelocity(StateIndex &is) override
Returns the group velocity of a quasiparticle from its Bloch index.
Definition: active_bandstructure.cpp:284
Eigen::VectorXd getEnergies(WavevectorIndex &ik) override
Returns the energies of all quasiparticle computed at a specified wavevector.
Definition: active_bandstructure.cpp:267
void setVelocities(Point &point, Eigen::Tensor< std::complex< double >, 3 > &velocities_) override
Method to save quasiparticle velocity operator in ActiveBandStructure.
Definition: active_bandstructure.cpp:396
int getNumIrrStates() override
Returns the number of irr points in this band structure.
Definition: active_bandstructure.cpp:203
std::vector< int > parallelIrrPointsIterator() override
Iterator over the irreducible points indices.
Definition: active_bandstructure.cpp:1189
std::vector< int > getReducibleStarFromIrreducible(const int &ik) override
Method to find the points equivalent to an irreducible point.
Definition: active_bandstructure.cpp:1248
int hasWindow() override
Checks whether the bandStructure has been built discarding some Bloch states from those available.
Definition: active_bandstructure.cpp:232
Eigen::Tensor< std::complex< double >, 3 > getPhEigenvectors(WavevectorIndex &ik) override
Obtain the eigenvectors of the quasiparticles at a specified wavevector.
Definition: active_bandstructure.cpp:341
Base class for describing objects containing the band structure, i.e.
Definition: bandstructure.h:15
Class containing the user input variables.
Definition: context.h:15
Virtual base class for Harmonic Hamiltonian.
Definition: harmonic.h:15
Class for implementing strong typing.
Definition: utilities.h:51
Determines whether we are dealing with phonons or electrons.
Definition: particle.h:17
Class used to pass a single wavevector.
Definition: points.h:18
Base class for storing wavevectors in the Brillouin zone.
Definition: points.h:73
Object for controlling the loop over temperatures and chemical potentials.
Definition: statistics_sweep.h:26
The window class contains the logic to decide whether to keep or discard a Bloch state.
Definition: window.h:17