Version 2, position dependent E/B, kinetic ions, boris mover, terminator
This commit is contained in:
Executable
+46
@@ -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 */
|
||||
Reference in New Issue
Block a user