Major changes:
- Moved to array operations for main loops. - Changed to setting pointers to operator only once before loop. - Changed Population Containers - Added Recombination - Added Inelastic Scattering Kinematics - Reworked Elastic Scattering Cross Section - Reworked Elastic Scattering Kinematics - Reworked organisation of different particle species and corresponding operators
This commit is contained in:
@@ -11,20 +11,54 @@
|
||||
using namespace std;
|
||||
|
||||
|
||||
ostream& operator<<(ostream& os, const species& SpecOut) {
|
||||
switch (SpecOut) {
|
||||
std::string get_species_string(const species &spec) {
|
||||
string res;
|
||||
switch (spec) {
|
||||
case electron:
|
||||
os<<"e-";
|
||||
res = "e-";
|
||||
break;
|
||||
case tritium:
|
||||
os<<"T3";
|
||||
case tritiumI:
|
||||
res = "T+";
|
||||
break;
|
||||
case tritium2I:
|
||||
res = "T2+";
|
||||
break;
|
||||
case tritium2:
|
||||
os<<"T_2";
|
||||
res = "T2";
|
||||
break;
|
||||
default:
|
||||
os<<"";
|
||||
stringstream ss;
|
||||
ss<<"get_species_string: Species not defined\n";
|
||||
throw MyException(ss.str());
|
||||
}
|
||||
return (res);
|
||||
}
|
||||
|
||||
double get_species_mass(const species &spec) {
|
||||
double res;
|
||||
switch (spec) {
|
||||
case electron:
|
||||
res = me_eV;
|
||||
break;
|
||||
case tritiumI:
|
||||
res = mT_eV;
|
||||
break;
|
||||
case tritium2I:
|
||||
res = mT2_eV;
|
||||
break;
|
||||
case tritium2:
|
||||
res = mT2_eV;
|
||||
break;
|
||||
default:
|
||||
stringstream ss;
|
||||
ss<<"get_species_mass: Species not defined\n";
|
||||
throw MyException(ss.str());
|
||||
}
|
||||
return (res);
|
||||
}
|
||||
|
||||
ostream& operator<<(ostream& os, const species& spec) {
|
||||
os<<get_species_string(spec);
|
||||
return (os);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user