Changed distance drawing procedure;
Changed mover to work with times instead of distance; Changed how interactions are done (recombination still tbd)
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
#include "simulation/energy_binning.h"
|
||||
#include <math.h>
|
||||
#include <algorithm>
|
||||
#include <iostream>
|
||||
#include <iomanip>
|
||||
|
||||
std::vector<double> generateLogBinBorders(double bin_min,
|
||||
double bin_max,
|
||||
@@ -24,10 +26,11 @@ std::vector<double> generateLinearBinBorders(double bin_min,
|
||||
const double bin_size = (bin_max - bin_min) / num_bins;
|
||||
|
||||
std::vector<double> bin_borders;
|
||||
for (int i = 0; i <= num_bins; ++i) {
|
||||
for (int i = 0; i < num_bins; ++i) {
|
||||
const double bin_border = bin_size * i + bin_min;
|
||||
bin_borders.push_back(bin_border);
|
||||
}
|
||||
bin_borders.push_back(bin_max);
|
||||
return bin_borders;
|
||||
}
|
||||
|
||||
@@ -66,7 +69,6 @@ PitchAngleBinning::PitchAngleBinning(int num_bins) :
|
||||
pitch_angle_bin_borders_(generateLinearBinBorders(-1, 1, num_bins)) {}
|
||||
|
||||
int PitchAngleBinning::bin(double pitch_angle) const {
|
||||
|
||||
auto const it = std::lower_bound(pitch_angle_bin_borders_.begin(),
|
||||
pitch_angle_bin_borders_.end(),
|
||||
pitch_angle);
|
||||
|
||||
Reference in New Issue
Block a user