Version 2, position dependent E/B, kinetic ions, boris mover, terminator
This commit is contained in:
Executable
+67
@@ -0,0 +1,67 @@
|
||||
#ifndef SIMULATION_H
|
||||
#define SIMULATION_H
|
||||
|
||||
#include <map>
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
#include "simulation/parameter.h"
|
||||
#include "simulation/particle.h"
|
||||
|
||||
class RandomNumbers;
|
||||
class InteractionOutput;
|
||||
class MagneticField;
|
||||
class ElectricField;
|
||||
class Timer;
|
||||
class Injector;
|
||||
class SimulationOutput;
|
||||
class CpuSynchronizer;
|
||||
|
||||
namespace species {
|
||||
class Specie;
|
||||
};
|
||||
|
||||
namespace interaction {
|
||||
class InteractionOutput;
|
||||
};
|
||||
|
||||
class Simulation {
|
||||
public:
|
||||
Simulation(std::string parameter_filename);
|
||||
|
||||
void init(Parameter& parameter);
|
||||
void start();
|
||||
void finalize();
|
||||
void processEvents(int events);
|
||||
void processUntilTermination(particle::Particle& particle,
|
||||
std::vector<particle::Particle>& particle_queue);
|
||||
|
||||
private:
|
||||
std::vector<particle::Particle> determineInjectedParticles(
|
||||
RandomNumbers* random);
|
||||
|
||||
double meanFreePath(particle::Particle& particle, RandomNumbers* random);
|
||||
|
||||
interaction::InteractionOutput interact(particle::Particle& particle,
|
||||
RandomNumbers* random);
|
||||
|
||||
std::map<std::string, std::shared_ptr<species::TrackedSpecie>>
|
||||
tracked_species_;
|
||||
std::map<std::string, std::shared_ptr<species::BackgroundSpecie>>
|
||||
background_species_;
|
||||
|
||||
std::shared_ptr<Injector> injector_;
|
||||
|
||||
std::shared_ptr<MagneticField> magnetic_field_;
|
||||
std::shared_ptr<ElectricField> electric_field_;
|
||||
|
||||
Parameter parameter_;
|
||||
std::shared_ptr<RandomNumbers> random_;
|
||||
|
||||
std::shared_ptr<Timer> timer_;
|
||||
|
||||
std::shared_ptr<SimulationOutput> output_;
|
||||
std::shared_ptr<CpuSynchronizer> cpu_synchronizer_;
|
||||
};
|
||||
|
||||
#endif /* SIMULATION_H */
|
||||
Reference in New Issue
Block a user