Phoebe developer's documentation  1.1.0
Phonon and Electron Boltzmann Equations
StatisticsSweep Class Reference

Object for controlling the loop over temperatures and chemical potentials. More...

#include <statistics_sweep.h>

Collaboration diagram for StatisticsSweep:

Public Member Functions

 StatisticsSweep (Context &context, FullBandStructure *fullBandStructure=nullptr)
 Constructor of the loop over temperatures and chemical potentials. More...
 
 StatisticsSweep (const StatisticsSweep &that)
 Copy constructor.
 
StatisticsSweepoperator= (const StatisticsSweep &that)
 Copy assignment.
 
CalcStatistics getCalcStatistics (const int &index)
 returns the CalcStatistics object containing temperature, chemical potential and temperature, given an index on the number of "calculations" = numTemperature*numChemicalPotentials. More...
 
CalcStatistics getCalcStatistics (const TempIndex &iTemp, const ChemPotIndex &iChemPot)
 returns the CalcStatistics object containing temperature, chemical potential and temperature, given indices on temperature and chemical potential. More...
 
int getNumCalculations () const
 Returns the number of "calculations" i.e. More...
 
int getNumChemicalPotentials () const
 Returns for how many chemical potentials we are computing properties.
 
int getNumTemperatures () const
 Returns for how many temperatures we are computing properties.
 
Particle getParticle () const
 Tells us which kind of bandstructure this statistics sweep matches. More...
 
void printInfo ()
 Prints to screen the information on the temperature, doping and chemical potentials to be computed in the current run.
 
void calcNumFreeCarriers (BaseBandStructure *bandStructure)
 calculate and print the number of free carriers More...
 

Protected Member Functions

double findChemicalPotentialFromDoping (const double &doping, const double &temperature)
 Computes the electronic chemical potential, given the doping concentration.
 
double findDopingFromChemicalPotential (const double &chemicalPotential, const double &temperature)
 The opposite of the previous method, computes the doping concentration given the electronic chemical potential.
 
double fPop (const double &chemPot, const double &temp)
 

Protected Attributes

Particle particle
 
int numCalculations = 0
 
Eigen::MatrixXd infoCalculations
 
int nTemp = 0
 
int nChemPot = 0
 
int nDop = 0
 
bool isDistributed = false
 
int dimensionality = 0
 
const int maxIter = 100
 
int numPoints = 0
 
int numBands = 0
 
std::vector< double > energies
 
double numElectronsDoped = 0.
 
double volume = 0.
 
double spinFactor = 0.
 
double occupiedStates = 0.
 
double fermiLevel = 0.
 

Detailed Description

Given temperatures and chemical potentials (or doping), we build a list of pairs of temperatures and chemical potentials (and doping). This list can be accessed to repeat calculations on a range of parameters.

Constructor & Destructor Documentation

◆ StatisticsSweep()

StatisticsSweep::StatisticsSweep ( Context context,
FullBandStructure fullBandStructure = nullptr 
)
explicit

For phonons, the constructor simply stores the temperatures. For electrons, the class finds chemical potentials from doping (or vice versa, depending on user input), and builds a table of all pairs of temperatures and chemical potentials.

Parameters
contextobject with user input.
Here is the call graph for this function:

Member Function Documentation

◆ calcNumFreeCarriers()

void StatisticsSweep::calcNumFreeCarriers ( BaseBandStructure bandStructure)
Parameters
bandStructure: the active band structure to calculate from
Here is the call graph for this function:

◆ getCalcStatistics() [1/2]

CalcStatistics StatisticsSweep::getCalcStatistics ( const int &  index)
Parameters
indexan integer, ranging in [0,numCalculations[
Returns
calcStatistics: a struct object with temperature, chemical potential and doping concentration, for this particular index.
Here is the caller graph for this function:

◆ getCalcStatistics() [2/2]

CalcStatistics StatisticsSweep::getCalcStatistics ( const TempIndex iTemp,
const ChemPotIndex iChemPot 
)
Parameters
iTempa strong-typed index, ranging in [0,numTemperatures[
iChemPota strong-typed index, ranging in [0,numChemicalPotentials[
Returns
calcStatistics: a struct object with temperature, chemical potential and doping concentration.
Here is the call graph for this function:

◆ getNumCalculations()

int StatisticsSweep::getNumCalculations ( ) const

the number of temperatures times the number of chemical potentials we will compute.

Here is the caller graph for this function:

◆ getParticle()

Particle StatisticsSweep::getParticle ( ) const
inline

The only time this matters is for the sake of chemical potentials.

Returns
Particle: the particle which was used to calculate the stat sweep.