Major changes:

- Added individul operators for species and better selecting process.
- Switched to C arrays for main loop operations and calculating array indizes using knowledge of binning instead of doing sorted search
- Added Recombination
- Reworked elastic scattering kinematics
- Added inelastic scattering kinematics
This commit is contained in:
Christian
2019-05-27 13:51:32 +02:00
parent ac83bae061
commit 79bf420f8d
56 changed files with 82194 additions and 0 deletions
+74
View File
@@ -0,0 +1,74 @@
//
// sub_interaction_base.h
// mc_electron
//
// Created by Christian Reiling on 19.05.19.
// Copyright © 2019 Christian Reiling. All rights reserved.
//
#ifndef sub_interaction_base_h
#define sub_interaction_base_h
#include <vector>
#include <deque>
#include "particle.hpp"
#include "population_base.h"
#include "error_types.h"
class InteractionOut {
bool delete_current;
Particle new_particles[3];
int number_new_particles;
bool decrease_density;
vec3 delete_location;
public:
InteractionOut() {reset();};
void reset() {
delete_current = false;
number_new_particles = 0;
decrease_density = false;
}
void set_delete_current(const bool &delete_current) {this->delete_current = delete_current;}
void add_new_particle(const Particle &newParticle) {
new_particles[number_new_particles] = newParticle;
number_new_particles++;
}
void set_delete_location (const vec3 &delete_location) {
this->delete_location = delete_location;
this->decrease_density = true;
}
bool get_delete_current() {return (delete_current);}
int get_number_new_particles() {return(number_new_particles);}
Particle *get_new_particles() {return(new_particles);}
bool get_delete_density() {return(decrease_density);}
vec3 get_delete_location() {return(delete_location);}
};
class Sub_Interaction_Base {
protected:
Population_Base *Population;
UniRNG *rngUni;
public:
Sub_Interaction_Base(Population_Base *Population, UniRNG *rngUni) {
this->Population = Population;
this->rngUni = rngUni;
};
virtual double get_macroSigma_m2(const Particle &interPart) = 0;
virtual InteractionOut do_Interaction (Particle *interPart) = 0;
};
#endif /* sub_interaction_base_h */