Version 2, position dependent E/B, kinetic ions, boris mover, terminator
This commit is contained in:
Executable
+81
@@ -0,0 +1,81 @@
|
||||
#ifndef POSITION_BINNING_H
|
||||
#define POSITION_BINNING_H
|
||||
|
||||
#include <vector>
|
||||
#include "blitz/array.h"
|
||||
|
||||
class LowerAndUpperBoundBinning {
|
||||
public:
|
||||
LowerAndUpperBoundBinning(int num_bins, double maximum);
|
||||
|
||||
int bin(double position) const;
|
||||
double stepsize() const;
|
||||
int numBins() const;
|
||||
int binIndexMin() const;
|
||||
int binIndexMax() const;
|
||||
std::vector<double> binBorders() const;
|
||||
|
||||
private:
|
||||
int num_bins_;
|
||||
double stepsize_;
|
||||
};
|
||||
|
||||
class LowerBoundBinningWithOverflow {
|
||||
public:
|
||||
LowerBoundBinningWithOverflow(int num_bins_excluding_overflow,
|
||||
double maximum);
|
||||
|
||||
int bin(double position) const;
|
||||
double stepsize() const;
|
||||
int numBinsWithOverflow() const;
|
||||
int numBinsWithoutOverflow() const;
|
||||
int binIndexMin() const;
|
||||
int binIndexMax() const;
|
||||
std::vector<double> binBorders() const;
|
||||
|
||||
private:
|
||||
int num_bins_;
|
||||
double stepsize_;
|
||||
};
|
||||
|
||||
class BinningWithOverAndUnderflow {
|
||||
public:
|
||||
BinningWithOverAndUnderflow(int num_bins_excluding_overunderflow,
|
||||
double maximum);
|
||||
|
||||
int bin(double position) const;
|
||||
double stepsize() const;
|
||||
int numBinsWithOverUnderflow() const;
|
||||
int numBinsWithoutOverUnderflow() const;
|
||||
int binIndexMin() const;
|
||||
int binIndexMax() const;
|
||||
std::vector<double> binBorders() const;
|
||||
|
||||
private:
|
||||
int num_bins_;
|
||||
double stepsize_;
|
||||
};
|
||||
|
||||
class CylinderBinning {
|
||||
public:
|
||||
CylinderBinning(int num_bins_radial,
|
||||
double radius,
|
||||
int num_bins_azimuthal,
|
||||
int num_bins_longitudinal,
|
||||
double height);
|
||||
|
||||
blitz::TinyVector<int, 3> bin(
|
||||
const blitz::TinyVector<double, 3>& cylinder_position) const;
|
||||
blitz::TinyVector<double, 3> stepsize() const;
|
||||
|
||||
blitz::TinyVector<int, 3> numBins() const;
|
||||
blitz::TinyVector<int, 3> numBinsIncludingOverUnderflow() const;
|
||||
blitz::TinyVector<int, 3> binIndexMin() const;
|
||||
blitz::TinyVector<int, 3> binIndexMax() const;
|
||||
|
||||
const LowerBoundBinningWithOverflow radial_binning;
|
||||
const LowerAndUpperBoundBinning azimuth_binning;
|
||||
const BinningWithOverAndUnderflow longitudinal_binning;
|
||||
};
|
||||
|
||||
#endif /* POSITION_BINNING_H */
|
||||
Reference in New Issue
Block a user