Phoebe developer's documentation  1.1.0
Phonon and Electron Boltzmann Equations
particle.h
1 #ifndef PARTICLE_H
2 #define PARTICLE_H
3 
4 #include "eigen.h"
5 
7 
17 class Particle {
18 public:
19  static const int electron = -1;
20  static const int phonon = -2;
21 
28  explicit Particle(int kind_);
29 
37  double getPopulation(const double &energy, const double &temperature,
38  const double &chemicalPotential = 0.) const;
39 
54  double getDndt(const double &energy, const double &temperature,
55  const double &chemicalPotential = 0.,
56  const bool &symmetrize = false) const;
57 
67  double getDnde(const double &energy, const double &temperature,
68  const double &chemicalPotential = 0.,
69  const bool &symmetrize = false) const;
70 
77  double getPopPopPm1(const double &energy, const double &temperature,
78  const double &chemicalPotential = 0.) const;
79 
82  bool isFermi() const;
83 
86  bool isBose() const;
87 
90  bool isElectron() const;
91 
94  bool isPhonon() const;
95 
96  int getParticleKind() const;
97 
98 private:
99  static const int fermi = 0;
100  static const int bose = 1;
101 
102  // identifies whether the instance is a fermion of a boson
103  int statistics;
104  // identifies whether we have an electron or a phonon
105  // Note: we keep particle != statistics because we might add particles
106  int kind;
107 };
108 
109 #endif
Determines whether we are dealing with phonons or electrons.
Definition: particle.h:17
double getDnde(const double &energy, const double &temperature, const double &chemicalPotential=0., const bool &symmetrize=false) const
Returns dn/dE, with E the particle energy, and n being either a Bose or Fermi distribution,...
Definition: particle.cpp:98
Particle(int kind_)
Constructor of Statistics.
Definition: particle.cpp:5
double getPopulation(const double &energy, const double &temperature, const double &chemicalPotential=0.) const
Returns either a Bose–Einstein or a Fermi–Dirac distribution, depending on the value of "statistics".
Definition: particle.cpp:49
bool isPhonon() const
Method to check if the particle is a phonon.
Definition: particle.cpp:41
double getDndt(const double &energy, const double &temperature, const double &chemicalPotential=0., const bool &symmetrize=false) const
Returns dn/dT, with T temperature, and n being either a Bose–Einstein or a Fermi–Dirac distribution,...
Definition: particle.cpp:87
double getPopPopPm1(const double &energy, const double &temperature, const double &chemicalPotential=0.) const
Returns bose(bose+1) for bosons, fermi(1-fermi) for fermions.
Definition: particle.cpp:107
bool isBose() const
Method to check if the particle is a boson.
Definition: particle.cpp:25
bool isElectron() const
Method to check if the particle is an electron.
Definition: particle.cpp:33
bool isFermi() const
Method to check if the particle is a fermion.
Definition: particle.cpp:17