Added statistics method for terminization channels of particles

and elastic scattering for T3+. In this version benchmark old run.
This commit is contained in:
Christian
2019-09-14 11:39:46 +02:00
parent bbdd9213a1
commit 3c3140d488
15 changed files with 338 additions and 161 deletions
+8 -23
View File
@@ -12,39 +12,24 @@
#include "terminator_base.h"
class E_Terminator : public Terminator_Base, private Energy_Terminator_Base, private MaxInteractions_Terminator_Base {
class Negative_Terminator : public Terminator_Base {
public:
E_Terminator(const int &maxInteractions, const double &cutoffEnergy_eV) : Terminator_Base(electron), Energy_Terminator_Base(cutoffEnergy_eV), MaxInteractions_Terminator_Base(maxInteractions) {};
Negative_Terminator(species this_species, long int max_interactions, double cut_off_energy_eV) : Terminator_Base(this_species, max_interactions, cut_off_energy_eV) {};
bool checkTermination (const Particle &movePart);
private:
bool check_Wall(const Particle &movePart);
bool check_walls(const vec3 &loc_m);
};
inline bool E_Terminator::checkTermination (const Particle &movePart) {
if (check_Wall(movePart)) {
return true;
}
if (check_Energy(movePart)) {
return true;
}
if (check_MaxInteractions(movePart)) {
return true;
}
return false;
}
inline bool E_Terminator::check_Wall(const Particle &movePart) {
vec3 loc_m = movePart.get_x_m();
double z_m = loc_m[2];
double r_m = sqrt( pow(loc_m[0],2) + pow(loc_m[1],2) );
inline bool Negative_Terminator::check_walls(const vec3 &loc_m) {
double z_m = calc_z_m(loc_m);
double r_m = calc_r_m(loc_m);
if (z_m <= z_RW_m) {
stats.n_rw += 1;
return true;
}
if (r_m >= r_WGTS_m) {
stats.n_radial += 1;
return true;
}
return false;