Merge branch 'reiling-development' of http://fsk-serval.puk.ac.za/gitea/katrin/katrin-plasma into reiling-development
# Conflicts: # src/mc_electron/injector.cpp
This commit is contained in:
@@ -46,8 +46,15 @@ inline double roll_MBEnergy(const double &Temp_K, const double &m_eV,ranlib::Nor
|
||||
sum += pow(rngNormal->random(),2);
|
||||
}
|
||||
beta = sqrt(C*(sum));
|
||||
|
||||
return (calc_gamma_from_beta(beta)-1)*m_eV;
|
||||
/*
|
||||
double gamma = calc_gamma_from_beta(beta);
|
||||
if (gamma == 1) {
|
||||
return 0.5*m_eV*beta*beta;
|
||||
} else {
|
||||
return ((gamma-1)*m_eV);
|
||||
}
|
||||
*/
|
||||
return 0.5*m_eV*beta*beta;
|
||||
}
|
||||
|
||||
inline double roll_Rejectionmethod(double (*pdf)(double), double xmin, double xmax, double pmax, ranlib::Uniform<double> *rngUni) {
|
||||
|
||||
Reference in New Issue
Block a user