Phoebe developer's documentation  1.1.0
Phonon and Electron Boltzmann Equations
window.h
1 #ifndef WINDOW_H
2 #define WINDOW_H
3 
4 #include "context.h"
5 #include "eigen.h"
6 #include "particle.h"
7 
17 class Window {
18  public:
33  Window(Context &context, Particle &particle_, const double &temperatureMin =
34  0., const double &temperatureMax = 0.,
35  const double &chemicalPotentialMin = 0.,
36  const double &chemicalPotentialMax = 0.);
37 
50  std::tuple<std::vector<double>, std::vector<int>> apply(
51  Eigen::VectorXd &energies);
52 
53  // Constants that identify the kind of filter to be used
56  static const int nothing = 0;
57 
60  static const int population = 1;
61 
64  static const int energy = 2;
65 
69  static const int muEnergy = 3;
70 
75  int getMethodUsed() const;
76  private:
79  Particle &particle;
80 
81  // parameters for window
82  double temperatureMin, temperatureMax;
83  double chemicalPotentialMin, chemicalPotentialMax;
84  double populationThreshold = 0.;
85  double minEnergy = 0., maxEnergy = 0.;
86 
89  int method;
90 
93  int numBands = 0;
94 
95  // internal method to apply the window on population
96  std::tuple<std::vector<double>, std::vector<int>> internalPopWindow(
97  const Eigen::VectorXd &energies, const Eigen::VectorXd &popMin,
98  const Eigen::VectorXd &popMax) const;
99  // internal method to apply the window on energy
100  std::tuple<std::vector<double>, std::vector<int>> internalEnWindow(
101  const Eigen::VectorXd &energies) const;
102 };
103 
104 #endif
Class containing the user input variables.
Definition: context.h:15
Determines whether we are dealing with phonons or electrons.
Definition: particle.h:17
The window class contains the logic to decide whether to keep or discard a Bloch state.
Definition: window.h:17
static const int energy
energy labels the window type looking for states within two energy values
Definition: window.h:64
static const int population
population labels the window type looking for partially occupied states
Definition: window.h:60
int getMethodUsed() const
Returns the kind of energy filter used.
Definition: window.cpp:159
static const int nothing
nothing=0 identifies the do-nothing window
Definition: window.h:56
Window(Context &context, Particle &particle_, const double &temperatureMin=0., const double &temperatureMax=0., const double &chemicalPotentialMin=0., const double &chemicalPotentialMax=0.)
Class constructor.
Definition: window.cpp:9
static const int muEnergy
the window type is provided by the user as an energy range, where the values are a +/- range around m...
Definition: window.h:69
std::tuple< std::vector< double >, std::vector< int > > apply(Eigen::VectorXd &energies)
public interface to use the window, used by activeBandStructure.
Definition: window.cpp:81