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
+36
View File
@@ -0,0 +1,36 @@
#ifndef EVENT_POSITION_DISTRIBUTION_H
#define EVENT_POSITION_DISTRIBUTION_H
#include <memory>
#include <random>
#include "simulation/coordinates.h"
#include "simulation/scalar_field.h"
struct Limit {
Limit() : min(0), max(0){};
Limit(double min, double max) : min(min), max(max){};
double min;
double max;
};
class EventPositionDistribution {
public:
EventPositionDistribution(std::shared_ptr<ScalarField> mother_density,
Limit density,
Limit r_position,
Limit phi_position,
Limit z_position);
CylinderCoordinate rollPosition(std::mt19937* engine);
private:
std::shared_ptr<ScalarField> mother_density_;
// for Rejection method
std::uniform_real_distribution<double> r_values;
std::uniform_real_distribution<double> z_values;
std::uniform_real_distribution<double> phi_values;
std::uniform_real_distribution<double> density_values;
};
#endif /* EVENT_POSITION_DISTRIBUTION_H */