Version 2, position dependent E/B, kinetic ions, boris mover, terminator

This commit is contained in:
Jonas Kellerer
2022-10-21 10:09:19 +02:00
parent acc55cf003
commit 83fd2e5d7e
869 changed files with 1033204 additions and 3634436 deletions
+46
View File
@@ -0,0 +1,46 @@
#ifndef INTERACTION_H
#define INTERACTION_H
#include "simulation/particle.h"
#include "simulation/random_numbers.h"
#include "simulation/species.h"
#include <functional>
#include <memory>
#include <vector>
namespace interaction {
class InteractionOutput {
public:
InteractionOutput();
void deleteCurrentParticle(bool new_decider);
bool deleteCurrentParticle();
void add(const particle::Particle& new_particle);
std::vector<particle::Particle> newParticles();
private:
bool delete_current_particle_;
std::vector<particle::Particle> new_particles_;
};
class Interaction {
public:
Interaction(std::function<double(double)> cross_section,
std::shared_ptr<species::Specie> target);
virtual double microscopicCrossSection(double energy_eV);
virtual double macroscopicCrossSection(particle::Particle& particle);
virtual InteractionOutput performInteraction(particle::Particle& particle,
RandomNumbers* generator) = 0;
protected:
std::function<double(double)> cross_section_;
std::shared_ptr<species::Specie> target_;
};
}; // namespace interaction
#endif /* INTERACTION_H */