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
+50
View File
@@ -0,0 +1,50 @@
#ifndef SCATTERING_ANGLE_DISTRIBUTION_H
#define SCATTERING_ANGLE_DISTRIBUTION_H
#include <map>
#include <memory>
#include <random>
#include <string>
#include <vector>
#include "simulation/energy_binning.h"
class ScatteringAngleDistribution {
public:
virtual double roll(std::mt19937* engine, double energy_eV) = 0;
};
class IsotropicAngleDistribution : public ScatteringAngleDistribution {
public:
IsotropicAngleDistribution();
double roll(std::mt19937* engine, double energy_eV = 0.);
private:
std::uniform_real_distribution<double> distribution_;
};
class AngleDistributionFromFile : public ScatteringAngleDistribution {
public:
AngleDistributionFromFile(std::string absolute_filepath);
double roll(std::mt19937* engine, double energy_eV);
private:
std::shared_ptr<EnergyBinning> energy_binning_;
std::vector<std::piecewise_linear_distribution<double>> angle_distributions_;
};
class CompositeAngleDistribution : public ScatteringAngleDistribution {
public:
CompositeAngleDistribution(
std::shared_ptr<ScatteringAngleDistribution> lower_distribution,
std::shared_ptr<ScatteringAngleDistribution> higher_distribution,
double decider_energy);
double roll(std::mt19937* engine, double energy_eV);
private:
std::shared_ptr<ScatteringAngleDistribution> lower_distribution_;
std::shared_ptr<ScatteringAngleDistribution> higher_distribution_;
const double decider_energy_;
};
#endif /* SCATTERING_ANGLE_DISTRIBUTION_H */