Phoebe developer's documentation  1.1.0
Phonon and Electron Boltzmann Equations
statistics_sweep.h
1 #ifndef SWEEP_H
2 #define SWEEP_H
3 
4 #include <memory>
5 
6 #include "bandstructure.h"
7 #include "context.h"
8 #include "particle.h"
9 #include "utilities.h"
10 
16  double temperature;
17  double chemicalPotential;
18  double doping;
19 };
20 
27 
28  public:
36  explicit StatisticsSweep(Context &context,
37  FullBandStructure *fullBandStructure = nullptr);
38 
41  StatisticsSweep(const StatisticsSweep &that);
42 
46 
54  CalcStatistics getCalcStatistics(const int &index);
55 
66  const ChemPotIndex &iChemPot);
67 
71  int getNumCalculations() const;
72 
75  int getNumChemicalPotentials() const;
76 
79  int getNumTemperatures() const;
80 
86  inline Particle getParticle() const { return particle; }
87 
91  void printInfo();
92 
96  void calcNumFreeCarriers(BaseBandStructure* bandStructure);
97 
98  protected:
99 
100  Particle particle;
101  int numCalculations = 0;
102  Eigen::MatrixXd infoCalculations;
103  int nTemp = 0;
104  int nChemPot = 0;
105  int nDop = 0;
106  bool isDistributed = false;
107  int dimensionality = 0;
108 
109  // note: these three private methods are only meant to be used
110  // during the construction of this class, as they depend on energies
111 
115  double findChemicalPotentialFromDoping(const double &doping,
116  const double &temperature);
117 
121  double findDopingFromChemicalPotential(const double &chemicalPotential,
122  const double &temperature);
123 
124  // Auxiliary function for finding the chemical potential.
125  double fPop(const double &chemPot, const double &temp);
126 
127  // this block is temporary variables for electronic calculations
128  const int maxIter = 100;
129  int numPoints = 0;
130  int numBands = 0;
131  std::vector<double> energies;
132  double numElectronsDoped = 0.;
133  double volume = 0.;
134  double spinFactor = 0.;
135  double occupiedStates = 0.;
136  double fermiLevel = 0.;
137 };
138 
139 #endif
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
FullBandStructure is the class that stores the energies, velocities and eigenvectors of a quasipartic...
Definition: bandstructure.h:318
Class for implementing strong typing.
Definition: utilities.h:51
Determines whether we are dealing with phonons or electrons.
Definition: particle.h:17
Object for controlling the loop over temperatures and chemical potentials.
Definition: statistics_sweep.h:26
double findChemicalPotentialFromDoping(const double &doping, const double &temperature)
Computes the electronic chemical potential, given the doping concentration.
Definition: statistics_sweep.cpp:277
void printInfo()
Prints to screen the information on the temperature, doping and chemical potentials to be computed in...
Definition: statistics_sweep.cpp:421
int getNumChemicalPotentials() const
Returns for how many chemical potentials we are computing properties.
Definition: statistics_sweep.cpp:417
StatisticsSweep & operator=(const StatisticsSweep &that)
Copy assignment.
Definition: statistics_sweep.cpp:236
int getNumCalculations() const
Returns the number of "calculations" i.e.
Definition: statistics_sweep.cpp:415
CalcStatistics getCalcStatistics(const int &index)
returns the CalcStatistics object containing temperature, chemical potential and temperature,...
Definition: statistics_sweep.cpp:400
double findDopingFromChemicalPotential(const double &chemicalPotential, const double &temperature)
The opposite of the previous method, computes the doping concentration given the electronic chemical ...
Definition: statistics_sweep.cpp:373
int getNumTemperatures() const
Returns for how many temperatures we are computing properties.
Definition: statistics_sweep.cpp:419
void calcNumFreeCarriers(BaseBandStructure *bandStructure)
calculate and print the number of free carriers
Definition: statistics_sweep.cpp:452
StatisticsSweep(Context &context, FullBandStructure *fullBandStructure=nullptr)
Constructor of the loop over temperatures and chemical potentials.
Definition: statistics_sweep.cpp:12
Particle getParticle() const
Tells us which kind of bandstructure this statistics sweep matches.
Definition: statistics_sweep.h:86
Container for temperature, chemical potential, doping, to be used.
Definition: statistics_sweep.h:15